Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CoffeeScript and Less
Search
Daniel Shearmur
April 18, 2013
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CoffeeScript and Less
Daniel Shearmur
April 18, 2013
More Decks by Daniel Shearmur
See All by Daniel Shearmur
SIPP2 Front-end Optimisations
danshearmur
0
90
Front-end Workshop
danshearmur
0
140
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
30 Presentation Tips
portentint
PRO
1
430
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Paper Plane
katiecoart
PRO
5
54k
A Soul's Torment
seathinner
8
3.8k
Accessibility Awareness
sabderemane
1
250
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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 */