Mais conteúdo relacionado
Semelhante a CSS előfeldolgozók (20)
CSS előfeldolgozók
- 2. What’s wrong with CSS?
.my-module a { /*...*/ }
.my-module a:hover { /*...*/ }
.my-module strong { /*...*/ }
.my-module p.em { /*...*/ }
.my-module p.em em { /*...*/ }
- 3. What’s wrong with CSS?
.my-module a { /*...*/ }
.my-module a:hover { /*...*/ }
.my-module strong { /*...*/ }
.my-module p.em { /*...*/ }
.my-module p.em em { /*...*/ }
verbose,
primitive
- 4. What’s wrong with CSS?
.content {
border-radius: ...
-*-border-radius: ...
}
.sidebar {
border-radius: ...
-*-border-radius: ...
}
- 5. What’s wrong with CSS?
.content {
border-radius: ...
-*-border-radius: ...
} Must repeat
.sidebar { yourself
border-radius: ...
-*-border-radius: ...
}
- 7. Saying
- LESS The dynamic stylesheet
language
- SASS Syntactically Awsome
CSS (Sass makes CSS fun again)
- Stylus Expressive, dynamic,
robust CSS
- 8. Runs on…
- LESS JavaScript (Node.js,
Rhino, FF, Chrome, Safari…)
- SASS Ruby gem
- Stylus Node.js
- 9. Syntax
- LESS CSS-like syntax
- SASS both CSS-like (SCSS)
and new (SASS) syntax
- Stylus new syntax (optional)
- 13. Why LESS?
- CSS-like syntax:
easy to migrate
- JavaScript:
everything is in the hand
But we must compile
styles from now
- 14. Variables & functions
@defaultSize: 12px;
@emColor: #999;
p { font-size: @defaultSize; }
em { color: @emColor; }
quote {
font-size: @defaultSize * 1.2;
color: lighten(@emColor, 15%);
}
- 17. Questions & Links
About the presenter:
http://www.virtual-call-center.hu/
http://farkas-mate.hu/
?
Preprocessors:
http://lesscss.org/
http://sass-lang.com/
http://learnboost.github.com/stylus/