3. CSS can become messy
• Many site sections
• Many page sections
• Many devices
• Many screen resolutions
• Many colors, fonts, helpers, etc.
lunedì 5 novembre 2012
4. CSS can become messy
• Not a unique author
• Not a unique coding style
lunedì 5 novembre 2012
6. CSS can become looong
• we could split the code into more CSS files,
big, long authoring CSS files
but it would mean more HTTP requests
• not so easy you first look to someone else's code
expecially when
to read and to manage
lunedì 5 novembre 2012
8. CSS can be repetitive
• Rules with same #id + different .class
• Rules with same font, same color in
different sections of the page
lunedì 5 novembre 2012
9. CSS is not a complete language
lunedì 5 novembre 2012
10. CSS is not a complete language
• No variables
• No extending
• No math
• Few functions (rgb, rgba, ...)
lunedì 5 novembre 2012
11. What if all this
could CHANGE?
lunedì 5 novembre 2012
12. What if we could use...
NESTING?
lunedì 5 novembre 2012
20. What if we could use...
PARTIALS?
lunedì 5 novembre 2012
21. PARTIALS
“Could you please explain your strategy for building CSS?
How do you start and what does the structure of your style sheet look like?
How do you structure your code?”
lunedì 5 novembre 2012
24. SASS
Sass makes CSS fun again. Sass is an extension of CSS3, adding
nested rules, variables, mixins, selector inheritance, and more.
lunedì 5 novembre 2012
25. SASS 3 does all this
(and lots more)
lunedì 5 novembre 2012
26. It also allows to do more
powerful stuff
(if you love power & complexity)
using Mixins
lunedì 5 novembre 2012
27. It also removes comments
we don't want to publish
i.g. "fuck IE"
lunedì 5 novembre 2012
28. It also allows to choose the
output CSS style, including
compressed
lunedì 5 novembre 2012
29. So why aren't we
using it (yet)?
lunedì 5 novembre 2012
38. 2. IT'S LOADED WITH LOTS
OF HELPERS & PATTERNS
lunedì 5 novembre 2012
39. 2. IT'S LOADED WITH LOTS
OF HELPERS & PATTERNS
CSS3,Typography, Utilities, Reset, Grids,
Clearfix, Sticky Footer, and more
lunedì 5 novembre 2012
40. 3. IT MAKES VERY EASY TO
WORK with SPRITES
lunedì 5 novembre 2012
41. 3. IT MAKES VERY EASY TO
WORK with SPRITES
You just add the images, it generates the
sprite + gives you a helper to use your
images
lunedì 5 novembre 2012
43. Resume
•Nesting
• Variables
• Functions
• Math
• Partials
lunedì 5 novembre 2012
44. Resume
•No more mess
• Shorter files
• No repetition (DRY)
lunedì 5 novembre 2012
45. Resume
•It's used worldwide by the best front-end developers
• It would technically advance our company
• It would empower your professional skills
lunedì 5 novembre 2012