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
The evolution of CSS - 2
Search
Mattia Larentis
February 05, 2013
Programming
120
1
Share
The evolution of CSS - 2
Mattia Larentis
February 05, 2013
More Decks by Mattia Larentis
See All by Mattia Larentis
Going isomorphic with Django and React
nostalgia
0
540
django loves gulp
nostalgia
0
170
orrfuscation
nostalgia
0
140
The evolution of CSS
nostalgia
4
320
jQuery
nostalgia
4
440
Other Decks in Programming
See All in Programming
Running Swift without an OS
kishikawakatsumi
0
870
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
120
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
170
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.5k
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
310
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
730
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.2k
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
300
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
160
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
410
書き換えて学ぶTemporal #fukts
pirosikick
2
330
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
290
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Documentation Writing (for coders)
carmenintech
77
5.3k
Ethics towards AI in product and experience design
skipperchong
2
270
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Faster Mobile Websites
deanohume
310
31k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
For a Future-Friendly Web
brad_frost
183
10k
Transcript
Mattia Larentis - @spiritualguru the evolution of css
a long time ago...
1980s
Nerdz
CERN
Share documents
HTML HyperText Markup Language
tags!
paragraphs titles bulleted lists
1993
people began to talk about STYLE
W3C World Wide Web Consortium
CSS Cascading Style Sheet
1996
version 1.0
None
from 1998 to 2004
version 2.0
new Browsers
None
None
None
WIN
TODAY
version 3.0
New Features
Border Radius 2D Transforms Box Shadow RGBA Colors
but...
CSS SUCKS
Problems
vars
nesting
performance
is there a solution?
YES!
preprocessing
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
{LESS} The dynamic stylesheet language.
Sass Syntactically Awesome StyleSheets
stylus Expressive, dynamic, robust CSS
None
ok... but... why?
it will make you CSS DRY
it will save your time
it will make your code easy to maintain
it will make your CSS more organized
it’s fun
talk is cheap, show me the code
START
<link rel="stylesheet/less" type="text/css" href="styles.less" />
<script src="less.js"></script>
IMPORT
@import "vars";
VARS
@border: 1px; @color: #111; @red: #842210;
.my-class { color: @color; border-left: @border; border-right: @border; }
.my-class { color: #111; border-left: 1px; border-right: 1px; }
OPERATIONS
.my-class { color: (@color + #030); border-right: (@border * 2);
}
.my-class { color: #114411; border-right: 2px; }
MIXIN
.border-radius (@radius: 5px) { -webkit-border-radius: @radius; -moz-border-radius: @radius; -ms-border-radius: @radius;
-o-border-radius: @radius; border-radius: @radius; }
.my-class { .border-radius(2px); } .another-class { .border-radius; }
.my-class { -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px;
border-radius: 2px; }
.another-class { -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px;
border-radius: 5px; }
NESTING
.my-class { h1 { font-weight: bold; } p { font-size:
12px; a { text-decoration: none; &:hover { color: @red; } } } }
.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; }
Questions?!?
Mattia Larentis http://larentis.eu
[email protected]
@spiritualguru github.com/nostalgiaz