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

Architecting CSS

Chris Basham
August 25, 2014

Architecting CSS

Presented at IxDA Bloomington, Chris Basham discusses CSS best practices and workflows. Learn how class naming conventions and rigorous file organization can help teams understand and be quickly familiar with unfamiliar styles. Discover how to integrate pre-processors into your build process to increase productivity and prepare styles for production.

Mon, Aug 25, 2014

http://www.meetup.com/IxDA-Bloomington/events/198163982/

Chris Basham

August 25, 2014
Tweet

More Decks by Chris Basham

Other Decks in Design

Transcript

  1. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> 2 #ids {} 3 .classes {} 4 elements {}
  2. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> − CSS embedded in HTML − no reuse !
  3. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> −2 2 #ids {} 3 .classes {} 4 elements {}
  4. P R I O R I T Y O F

    S E L E C T O R T Y P E S ! 2 #ids {} + no coupling − no reuse
  5. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> −2 2 #ids {} +0 3 .classes {} 4 elements {}
  6. P R I O R I T Y O F

    S E L E C T O R T Y P E S ! ! 3 .classes {} + no coupling + infinite reuse
  7. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> −2 2 #ids {} +0 3 .classes {} +2 4 elements {}
  8. P R I O R I T Y O F

    S E L E C T O R T Y P E S ! ! − CSS dictates HTML 4 elements {} ~ limited reuse
  9. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> −2 2 #ids {} +0 3 .classes {} +2 4 elements {} −0.5
  10. P R I O R I T Y O F

    S E L E C T O R T Y P E S 1 <inline styles=“”/> 2 #ids {} 3 .classes {} 4 elements {}
  11. B Y S M A R T LY U S

    I N G H Y P H E N S & C A S I N G : Selectors become more legible Relationships are better understood Styles feel self-contained & modular
  12. P O P U L A R P R E

    - P R O C E S S O R S Less Myth Rework Sass Stylus
  13. M Y P R E F E R E N

    C E Less ! ! Sass
  14. P R E - P R O C E S

    S O R B E N E F I T S Functions Importing Mixins Nesting & parent selectors Variables
  15. B E N E F I T S N E

    E D E D F O R T H I S T E C H N I Q U E ! Importing ! Nesting & parent selectors
  16. Chris Basham @chrisbasham ! I X D A B L

    O O M I N G T O N 
 A U G U S T 2 0 1 4