Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSS to SCSS

CSS to SCSS

Rob Walker from Papertrail takes us through his recent journey from regular CSS to SCSS. If you’re thinking of making the switch yourself and just need a little push, this is the talk for you.

Frontend NE

April 02, 2015
Tweet

More Decks by Frontend NE

Other Decks in Technology

Transcript

  1. Coming up • Why you should use SCSS • Working

    with SCSS • Making the switch • Next steps • Questions
  2. Why should you use SCSS • Easy to learn, and

    you can start today • Makes CSS more powerful • Will make your life easier
  3. Nesting • Your HTML is in a nested hierarchy. Your

    CSS can be to. • Write less • Read more easily
  4. Variables • Define once, use everywhere • Control a whole

    layout or style from a few variables • Use the variables in calculations, colour modifiers and loads of other operators
  5. Partials and Import • Split SCSS into manageable chunks. •

    Organise your files • Import open source libraries
  6. Mixins • Reusable snippets of SCSS • Prevent repetition •

    Use open source mixins to make life easier
  7. How to make the switch • Install SCSS - sass-lang.com/install

    • Convert CSS to SCSS - Just rename .css to .scss • Generate SCSS - scss styles.scss:styles.css • Play and learn (and read the docs)
  8. Next steps • Try SCSS out yourself • Read the

    guide at sass-lang.com/guide • Check out the Frameworks (Compass, Bourbon, Susy)