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

How I Style Sheet

How I Style Sheet

Tips on CSS and pointers to some best practices and guides

Gregory McIntyre

February 18, 2014
Tweet

More Decks by Gregory McIntyre

Other Decks in Programming

Transcript

  1. SASS (with Compass) ☑ DRY Values
 ☑ Calculate Values On-the-Fly


    ☑ DRY Selectors
 ☑ DRY Vendor Prefixes
 ☑ Convey Intent
 ☑ Cross Browser Compatibility
  2. CSS is First Class Code Good naming Separation of concerns

    Code reviews Refactoring Bugs, verification, regressions
  3. Do I Need Strict Content Semantics? Different and wildly different

    themes all at the same time? User edited markup? CMS?
  4. SASS+OOCSS+SMACSS DRY selectors DRY values DRY media queries (@content) DRY

    vendor prefixes (Compass) Minimise amount of code Fast render speed Conventions Clear intent