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

Naming CSS Stuff is Really Hard

Naming CSS Stuff is Really Hard

Lightning talk for Dayton Clean Coders, 05/25/2014

Ethan Muller

May 20, 2014
Tweet

More Decks by Ethan Muller

Other Decks in Design

Transcript

  1. THE THREE BIG CATEGORIES LOGICAL ‣ Styles are being applied

    for a reason ‣ The best option ‣ Usually not possible
  2. THE THREE BIG CATEGORIES PRESENTATIONAL ‣ Names describe the appearance

    of elements ‣ Names are self-describing ‣ Presentation changes require markup changes ‣ Conducive to style reuse
  3. THE THREE BIG CATEGORIES CONTENT-BASED ‣ Names are based on

    the content they’re styling ‣ Change presentation without touching markup ‣ Difficult to reuse styles ‣ Lots and lots of names ‣ Requires reading the stylesheet