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

WTF: OOCSS like a boss !

samant
September 16, 2013

WTF: OOCSS like a boss !

Here is a piece of advice and good practices to help you improve your css skills and put easily in place a complete and reusable framework for your future projects. Leading you to to be the next king of object oriented CSS!

samant

September 16, 2013
Tweet

More Decks by samant

Other Decks in Programming

Transcript

  1. • Maintainable CSS • Concise CSS • Reusable CSS •

    Linked to two principles: • Separate structure and skin • Separate container and content
  2. DETECT OBJECTS Rule #1: Ignore HTML Scan your wireframes Reusable?

    Unique behaviour? For each of them «What’s this thing?» Identified List all runtime states
  3. .css() is evil Avoid IDs and elements Always start by

    identification Horizontal explosion
  4. .css() is evil Avoid IDs and elements Always start by

    identification Vertical explosion Horizontal explosion