Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CoffeeScript and Less
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Daniel Shearmur
April 18, 2013
1
120
CoffeeScript and Less
Daniel Shearmur
April 18, 2013
Tweet
Share
More Decks by Daniel Shearmur
See All by Daniel Shearmur
SIPP2 Front-end Optimisations
danshearmur
0
85
Front-end Workshop
danshearmur
0
130
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.6k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
The Pragmatic Product Professional
lauravandoore
37
7.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
61
52k
A Soul's Torment
seathinner
5
2.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
Evolving SEO for Evolving Search Engines
ryanjones
0
150
Transcript
None
None
None
BAD
var x = 10; x = 10
functions square = (x) -> x * x cube =
(x) -> square(x) * x cube 4 # same as cube(4)
objects singers = {Jagger: "Rock", Elvis: "Roll"} kids = brother:
'paul' sister: 'jane'
arrays primes = [2, 3, 5, 7, 11, 13] frontEnders
= [ 'dans' 'zsuzsa' 'gib' ]
loops eat food for food in ['toast', 'cheese', 'wine'] for
el in document.querySelectorAll('h2') el.style.display = "none" for key, val of window console.log key, val
conditionals if happy and knowsIt clapHands() else showIt() action =
if isHidden then "show" else "hide" doThings() unless x == 10
classes class Animal constructor: (@name) -> move: (meters) -> alert
@name + " moved #{meters}m." class Snake extends Animal move: -> alert "Slithering..." super 5
splats curryFirst = (fn, first) -> (rest...) -> fn.apply(null, [first].concat(rest))
None
None
variables @primary: #fa0000; a, a:visited { color: @primary; }
mixins .bordered(@colour: black) { border-top: dotted 1px @colour; border-bottom: solid
2px @colour; } #menu a { color: #111; .bordered; } .post a { color: red; .bordered(pink); }
nesting .form-row { .clearfix; .textbox { border: 1px solid black;
&:active { border-color: blue; } } }
operations @base: 5%; @filler: @base * 2; @other: @base +
@filler;
colour functions lighten(@color, 10%); darken(@color, 10%);
import @import url('some.css'); /* bad*/ @import 'some.less'; /* good */