3. Sass makes CSS fun again.
Sass is CSS, plus nested rules,
variables, mixins, and more,
all in a concise, readable syntax.
— Hampton Catlin
Originally wrote Sass
4. The trouble with CSS.
- Super long, cluttered files.
- Lots of repetitive code.
- Vendor prefixes.
- Difficult to maintain.
- Messy!
22. SASS
CSS
Functions
- Logic! Just like real
programmers use.
< > <= => != ==
- Bonus, you can have
conditional or
looped CSS.
if(), @if, @for,
@while, @each
25. This seems like a lot...
- Where do I even begin?
- How do I keep all this organized?
- I have to use TERMINAL..?!
- Never mind, I’m switching back to
print design.
26. Don’t worry!
- You can refactor over time.
- Use partials and @import to
organize your Sass files.
- Tons of frameworks exist!
- Not to mention plenty of compiler GUIs.
27. Partials
- A file with CSS or Sass. Starts with _ and ends with .scss
- These can be @import’ed into one main SCSS file.
_header.scss
_footer.scss
_body.scss style.scss style.css