extends silent classes in s ass 3 2
play

EXTENDS & SILENT CLASSES IN S ASS 3.2 its like ninjas in your - PowerPoint PPT Presentation

EXTENDS & SILENT CLASSES IN S ASS 3.2 its like ninjas in your code EXTENDS & SILENT CLASSES IN S ASS 3.2 its like ninjas in your code OOCSS FRAMEWORKS create objects to streamline application? OOCSS FRAMEWORKS attempts to


  1. EXTENDS & SILENT CLASSES IN S ASS 3.2 it’s like ninjas in your code

  2. EXTENDS & SILENT CLASSES IN S ASS 3.2 it’s like ninjas in your code

  3. OOCSS FRAMEWORKS create ‘objects’ to streamline application?

  4. OOCSS FRAMEWORKS attempts to automate OOCSS CSS frameworks have been using OOCSS methods since inception. Where these fail is the insane amount of CSS selectors that by default are added to the site’s CSS. From grid systems to UI elements, CSS bloat is a real issue..

  5. OOCSS FRAMEWORKS attempts to automate OOCSS CSS frameworks have been using OOCSS methods since inception. Where these fail is the insane amount of CSS selectors that by Twitter’s default are added to the site’s CSS. bootstrap default includes 4914 From grid systems to UI elements, lines of CSS. CSS bloat is a real issue..

  6. OOCSS FRAMEWORKS attempts to automate OOCSS CSS frameworks have been using OOCSS methods since inception. Where these fail is the insane amount of CSS selectors that by Twitter’s default are added to the site’s CSS. bootstrap default includes 4914 From grid systems to UI elements, lines of CSS. CSS bloat is a real issue..

  7. DRY CODING find the pattern and D on’t R epeat Y ourself 9 out of 10 developers agree that using a DRY method of coding will save your bacon in the long run.

  8. DRY CODING find the pattern and D on’t R epeat Y ourself 9 out of 10 developers agree that using a DRY method of coding will save your bacon in the long run.

  9. OOCSS TEACHES US ... create ‘objects’ • Identify reusable objects • Be semantic w/HTML • Minimize selectors • Extend your classes • ‘Style’ separate from content • ‘Content’ separate from container

  10. OOCSS TEACHES US ... create ‘objects’ • Identify reusable objects what does this • Be semantic w/HTML mean? • Minimize selectors • Extend your classes • ‘Style’ separate from content • ‘Content’ separate from container

  11. TWITTER’S BUTTONS let’s look at some code

  12. OOCSS TEACHES US ... create ‘objects’ <ul class="nav nav-pills"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> <ul class="dropdown-menu"> <!-- links --> </ul> </li> </ul>

  13. OOCSS TEACHES US ... create ‘objects’ <ul class="nav nav-pills"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  14. OOCSS TEACHES US ... create ‘objects’ here <ul class="nav nav-pills"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  15. OOCSS TEACHES US ... create ‘objects’ here here <ul class="nav nav-pills"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  16. OOCSS TEACHES US ... create ‘objects’ here here <ul class="nav nav-pills"> here <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  17. OOCSS TEACHES US ... create ‘objects’ here here <ul class="nav nav-pills"> here here <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  18. OOCSS TEACHES US ... create ‘objects’ here here <ul class="nav nav-pills"> here here <li class="dropdown"> here <a class="dropdown-toggle" data-toggle="dropdown" href="#"> Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  19. OOCSS TEACHES US ... create ‘objects’ here here <ul class="nav nav-pills"> here here <li class="dropdown"> here <a class="dropdown-toggle" data-toggle="dropdown" href="#"> here Dropdown <b class="caret"></b> </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  20. OOCSS TEACHES US ... create ‘objects’ here here <ul class="nav nav-pills"> here here <li class="dropdown"> here <a class="dropdown-toggle" data-toggle="dropdown" href="#"> here Dropdown <b class="caret"></b> & here </a> Markup with <ul class="dropdown-menu"> presentational <!-- links --> classes </ul> </li> </ul>

  21. OOCSS TEACHES US ... create ‘objects’ How much .nav-tabs:before, CSS can it .nav-pills:before, really be? .nav-tabs:after, .nav-pills:after { display: table; content: ""; } It’s just .nav-tabs:after, for .nav-tabs .nav-pills:after { and .nav-pills clear: both; } .nav-tabs > li,

  22. cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; Dude, background-color: #999999; that’s a border-color: #999999; } lot of code! .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 1; filter: alpha(opacity=100); }

  23. cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; Dude, background-color: #999999; that’s a border-color: #999999; } lot of code! .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; That’s line opacity: 1; 169 right filter: alpha(opacity=100); there. }

  24. cursor: pointer; } This makes baby kitties cry .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; Dude, background-color: #999999; that’s a border-color: #999999; } lot of code! .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; That’s line opacity: 1; 169 right filter: alpha(opacity=100); there. }

  25. cursor: pointer; } This makes baby kitties cry Face it, CSS is .nav-tabs .open .dropdown-toggle, NOT DRY! .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; Dude, background-color: #999999; that’s a border-color: #999999; } lot of code! .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; That’s line opacity: 1; 169 right filter: alpha(opacity=100); there. }

  26. cursor: pointer; } This makes baby kitties cry Face it, CSS is .nav-tabs .open .dropdown-toggle, NOT DRY! .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; Dude, background-color: #999999; that’s a border-color: #999999; } lot of code! .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; 10 border-bottom-color: #ffffff; That’s line references of opacity: 1; 169 right #ffffff in this filter: alpha(opacity=100); there. example alone }

Recommend


More recommend