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

XXLCSS - How to scale CSS and keep your sanity

XXLCSS - How to scale CSS and keep your sanity

"Web" design has changed. Now is the time to stop and rethink our best practices. Which are the new, better practices and tools that will help us keep our sanity while scaling big projects?

Slides from UpNorth Conference in Athens, Greece.

Zaharenia Atzitzikaki

May 17, 2014
Tweet

More Decks by Zaharenia Atzitzikaki

Other Decks in Design

Transcript

  1. No.

  2. #header #footer .twitter #footer { background-color: #000; } #footer a

    { color: #fff; } .twitter { background-color: #fff; }
  3. #header #footer .twitter #footer { background-color: #000; } #footer a

    { color: #fff; } .twitter { background-color: #fff; } .twitter a { color: #000; }
  4. #header #footer .twitter #footer { background-color: #000; } #footer a

    { color: #fff; } .twitter { background-color: #fff; } .twitter a { color: #000; }
  5. <div class="content"> <h1>Big heading</h1> </div> <div class="sidebar"> <h2>Sidebar heading</h2> </div>

    <div class="footer"> <h4>Footer heading</h4> </div> h1 { font-size: 3em; } h2 { font-size: 2.4em; } h3 { font-size: 2em; } h4 { font-size: 1.6em; }
  6. <div class="content"> <h1>Big heading</h1> </div> <div class="sidebar"> <h2>Sidebar heading</h2> </div>

    <div class="footer"> <h4>Footer heading</h4> </div> h1 { font-size: 3em; } h2, .footer h4 { font-size: 2.4em; } h3 { font-size: 2em; } h4 { font-size: 1.6em; }
  7. <div class="content"> <h1>Big heading</h1> </div> <div class="sidebar"> <h2>Sidebar heading</h2> </div>

    <div class="footer"> <h4 class="beta">Footer heading</h4> </div> h1, .alpha { font-size: 3em; } h2, .beta { font-size: 2.4em; } h3, .gamma { font-size: 2em; } h4, .delta { font-size: 1.6em; }
  8. Classes work much better when we use them to represent

    visual semantics, rather than keeping them tied to content. — Nicole Sullivan (@stubbornella)
  9. <div class="box"> <h3>This is the box header</h3> </div> .box {

    background-color: #fff; border: 1px solid #ccc; } .box h3 { text-transform: uppercase; color: #333; }
  10. <div class="box"> <h4>This is the box header</h4> </div> .box {

    background-color: #fff; border: 1px solid #ccc; } .box h3, .box h4 { text-transform: uppercase; color: #333; }
  11. <div class="box"> <h3 class="box-header">This is the box header</h3> </div> .box

    { background-color: #fff; border: 1px solid #ccc; } .box-header { text-transform: uppercase; color: #333; }
  12. .media, .bd { overflow:hidden; } .media .img { float:left; margin-right:

    10px; } .media .img img { display:block; } .media .imgExt { float:right; margin-left: 10px; }
  13. The time saved using a css framework is spent looking

    up how to work with that framework. — Jesse Shawl (@jshawl)