Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Mattia Larentis - @spiritualguru the evolution of css
Slide 2
Slide 2 text
a long time ago...
Slide 3
Slide 3 text
1980s
Slide 4
Slide 4 text
Nerdz
Slide 5
Slide 5 text
CERN
Slide 6
Slide 6 text
Share documents
Slide 7
Slide 7 text
HTML HyperText Markup Language
Slide 8
Slide 8 text
tags!
Slide 9
Slide 9 text
paragraphs titles bulleted lists
Slide 10
Slide 10 text
1993
Slide 11
Slide 11 text
people began to talk about STYLE
Slide 12
Slide 12 text
W3C World Wide Web Consortium
Slide 13
Slide 13 text
CSS Cascading Style Sheet
Slide 14
Slide 14 text
1996
Slide 15
Slide 15 text
version 1.0
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
from 1998 to 2004
Slide 18
Slide 18 text
version 2.0
Slide 19
Slide 19 text
new Browsers
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
No content
Slide 23
Slide 23 text
WIN
Slide 24
Slide 24 text
TODAY
Slide 25
Slide 25 text
version 3.0
Slide 26
Slide 26 text
New Features
Slide 27
Slide 27 text
Border Radius 2D Transforms Box Shadow RGBA Colors
Slide 28
Slide 28 text
but...
Slide 29
Slide 29 text
CSS SUCKS
Slide 30
Slide 30 text
Problems
Slide 31
Slide 31 text
vars
Slide 32
Slide 32 text
nesting
Slide 33
Slide 33 text
performance
Slide 34
Slide 34 text
is there a solution?
Slide 35
Slide 35 text
YES!
Slide 36
Slide 36 text
preprocessing
Slide 37
Slide 37 text
A system written in another language that adds lots of tasty goodies that don’t exists natively, while still spitting out something a browser can understand
Slide 38
Slide 38 text
{LESS} The dynamic stylesheet language.
Slide 39
Slide 39 text
Sass Syntactically Awesome StyleSheets
Slide 40
Slide 40 text
stylus Expressive, dynamic, robust CSS
Slide 41
Slide 41 text
No content
Slide 42
Slide 42 text
ok... but... why?
Slide 43
Slide 43 text
it will make you CSS DRY
Slide 44
Slide 44 text
it will save your time
Slide 45
Slide 45 text
it will make your code easy to maintain
Slide 46
Slide 46 text
it will make your CSS more organized
Slide 47
Slide 47 text
it’s fun
Slide 48
Slide 48 text
talk is cheap, show me the code
Slide 49
Slide 49 text
START
Slide 50
Slide 50 text
Slide 51
Slide 51 text
Slide 52
Slide 52 text
IMPORT
Slide 53
Slide 53 text
@import "vars";
Slide 54
Slide 54 text
VARS
Slide 55
Slide 55 text
@border: 1px; @color: #111; @red: #842210;
Slide 56
Slide 56 text
.my-class { color: @color; border-left: @border; border-right: @border; }
Slide 57
Slide 57 text
.my-class { color: #111; border-left: 1px; border-right: 1px; }
Slide 58
Slide 58 text
OPERATIONS
Slide 59
Slide 59 text
.my-class { color: (@color + #030); border-right: (@border * 2); }
Slide 60
Slide 60 text
.my-class { color: #114411; border-right: 2px; }
Slide 61
Slide 61 text
MIXIN
Slide 62
Slide 62 text
.border-radius (@radius: 5px) { -webkit-border-radius: @radius; -moz-border-radius: @radius; -ms-border-radius: @radius; -o-border-radius: @radius; border-radius: @radius; }
Slide 63
Slide 63 text
.my-class { .border-radius(2px); } .another-class { .border-radius; }
Slide 64
Slide 64 text
.my-class { -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; }
Slide 65
Slide 65 text
.another-class { -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; }
Slide 66
Slide 66 text
NESTING
Slide 67
Slide 67 text
.my-class { h1 { font-weight: bold; } p { font-size: 12px; a { text-decoration: none; &:hover { color: @red; } } } }
Slide 68
Slide 68 text
.my-class h1 { font-weight: bold; } .my-class p { font-size: 12px; } .my-class p a { text-decoration: none; } .my-class p a:hover { color: #842210; }
Slide 69
Slide 69 text
Questions?!?
Slide 70
Slide 70 text
Mattia Larentis http://larentis.eu
[email protected]
@spiritualguru github.com/nostalgiaz