SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
OOCSSAndThe Life-Altering Awesomeness 	

That Is Modular CSS Architecture
Julie Cameron | @jewlofthelotus
WTF
CSS?!!?
WHAT IS 	

MODULAR CSS
ARCHITECTURE?
(It’s freaking awesome, that’s what.)	

!
!
The abstraction of repetition into reusable "objects".
FRONTEND OBJECTS
Naming Conventions Semantic .content, .news__title, .callNow	

Presentational .grid__col—-9, .btn—-small	

Modules with states .btn, .btn—primary, .btn—disabled.
Classes vs. IDs vs. Element Selectors Take that, specificity!
MODULAR CSS GOALS
Modularity (duh)	

Added new page.Wrote 0 lines of CSS.WIN.
Predictability
Hey! I know how to construct a new thing!	

Maintainability
Oh, you wanted a big button? .btn--large. BOOM.
Scalability
I got 99 problems, but specificity ain't one.	

Flexibility
Mixin' & Matchin’	

DRY & Organized
…ability. That’s just plain smart.
MODULAR CSS GOALS
Modularity (duh)	

Added new page.Wrote 0 lines of CSS.WIN.
Predictability
Hey! I know how to construct a new thing!	

Maintainability
Oh, you wanted a big button? .btn--large. BOOM.
Scalability
I got 99 problems, but specificity ain't one.	

Flexibility
Mixin' & Matchin’	

DRY & Organized
…ability. That’s just plain smart.
A WHOLE	

LOT OF	

WIN!
OBJECT COMPOSITION
Modifiers & States .media—-inline, .media—-collapsed .media__img—-right
Parent - Child Relationships
Objects / Modules / Blocks .media
.media__img, .media__body
OOCSS PRINCIPLES
Separation of	

Structure	

from
Skin
Separation of	

Container	

and
Content
STRUCTURE VS SKIN
Define repeating visual patterns as
reusable skins.	

Define repeating “invisible” patterns as
reusable structures.
// Structure
.btn {
border-radius: 4px;
display: inline-block;
font-size: 1.25em;
padding: 1em;
text-align: center;
vertical-align: middle;
}
!
// Skins
.btn-primary { background: blue; }
.btn-success { background: green; }
.btn-info { background: lightblue; }
.btn-warning { background: orange; }
.btn-danger { background: red; }
<button class=“btn btn-primary”></button>
<a class=“btn btn-success” href=“#”></a>
<input class=“btn btn-info” type=“submit” />
<span class=“btn btn-warning”></span>
<label class=“btn btn-danger”></label>
CONTAINER VS CONTENT
• An Object should look the same no
matter where you put it.
• AVOID Location-Dependent Styles
(which often leads to duplication)
.categoryList h2 {
// BAD! h2 styles are location
// dependent
}
!
.categoryHeader {
// GOOD! We can reuse this header
// style anywhere
}
Assurances
• All h2s will look like h2s.	

• All .categoryHeaders will look like .categoryHeaders
<h2 class=“categoryHeader”></h2>
BUT CLASSITIS?!? SEMANTICS?!?
Is this going to bloat my HTML markup with classes? Yes.
Is that a bad thing? Shrug.
What about semantics?! It’s complicated.
EXAMPLE TIME
!
%nav
%ul.list--horzRight.list--blockAll
%li
%a.media--inline
%span.media__img.icon-bookmark
%span.media__body Bookmark
%li.dropdown
%a.media--inline
%span.media__img.icon-share
%span.media__body Share
%ul.dropdown__content—-right.list—boxed
%li
%a.media--block
%span.media__img.icon-facebook
%span.media__body Facebook
%li
%a.media--block
%span.media__img.icon-twitter
%span.media__body Twitter
%li
%a.media--block
%span.media__img.icon-email
%span.media__body Email
Objects In Use:
• List	

• Media
• Dropdown	

• Icon
Y U NO
WRITE
OOCSS?!
QUESTIONS? AMA!
Slides & Resources: http://bit.ly/sem_oocss
!
@jewlofthelotus
Girl Develop It Ann Arbor	

Launch Party w/ Pillar @ The Forge
June 4th 6:30pm
RSVP @ meetup.com
Hey, look!
A media object!
RESOURCES
• https://github.com/stubbornella/oocss/wiki	

• http://www.smashingmagazine.com/2011/12/12/an-introduction-
to-object-oriented-css-oocss/	

• http://csswizardry.com/2014/03/naming-ui-components-in-oocss	

• http://oliverjash.me/2012/09/07/methods-for-modifying-objects-in-
oocss.html
OOCSS

Contenu connexe

Tendances

CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
Zoe Gillenwater
 
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
Christopher Schmitt
 
CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11
virtualsciences41
 
JavaScript For People Who Don't Code
JavaScript For People Who Don't CodeJavaScript For People Who Don't Code
JavaScript For People Who Don't Code
Christopher Schmitt
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Codecamp Romania
 

Tendances (20)

Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
Bootstrap [part 2]
Bootstrap [part 2]Bootstrap [part 2]
Bootstrap [part 2]
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
 
[edUi] HTML5 Workshop
[edUi] HTML5 Workshop[edUi] HTML5 Workshop
[edUi] HTML5 Workshop
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Modern Front-End Development
Modern Front-End DevelopmentModern Front-End Development
Modern Front-End Development
 
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
[HEWEBAR 2012] Beyond Desktop Browsing (HTML5)
 
CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11CT presentatie JQuery 7.12.11
CT presentatie JQuery 7.12.11
 
What's Object-Oriented CSS (japanese)
What's Object-Oriented CSS (japanese)What's Object-Oriented CSS (japanese)
What's Object-Oriented CSS (japanese)
 
ActiveDOM
ActiveDOMActiveDOM
ActiveDOM
 
JavaScript For People Who Don't Code
JavaScript For People Who Don't CodeJavaScript For People Who Don't Code
JavaScript For People Who Don't Code
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
 
Front-End Methodologies
Front-End MethodologiesFront-End Methodologies
Front-End Methodologies
 
Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners
 
Jquery News Packages
Jquery News PackagesJquery News Packages
Jquery News Packages
 
OOCSS for Javascript pirates at jQueryPgh meetup
OOCSS for Javascript pirates at jQueryPgh meetupOOCSS for Javascript pirates at jQueryPgh meetup
OOCSS for Javascript pirates at jQueryPgh meetup
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
HTML News Packages Lesson
HTML News Packages LessonHTML News Packages Lesson
HTML News Packages Lesson
 
Fewd week2 slides
Fewd week2 slidesFewd week2 slides
Fewd week2 slides
 
[WEB UI BASIC] CSS_1
[WEB UI BASIC] CSS_1[WEB UI BASIC] CSS_1
[WEB UI BASIC] CSS_1
 

Similaire à OOCSS Lightening Talk

Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Christian Lilley
 

Similaire à OOCSS Lightening Talk (20)

Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
 
Architecture for css
Architecture for cssArchitecture for css
Architecture for css
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
CSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreCSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and more
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes
 
The Future State of Layout
The Future State of LayoutThe Future State of Layout
The Future State of Layout
 
SMACSS Workshop
SMACSS WorkshopSMACSS Workshop
SMACSS Workshop
 
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective, Ajax ...
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective,  Ajax ...The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective,  Ajax ...
The Cascade, Grids, Headings, and Selectors from an OOCSS Perspective, Ajax ...
 
Everything You know about CSS is Wrong
Everything You know about CSS is WrongEverything You know about CSS is Wrong
Everything You know about CSS is Wrong
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
 
Rails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power StackRails, Postgres, Angular, and Bootstrap: The Power Stack
Rails, Postgres, Angular, and Bootstrap: The Power Stack
 
Build a better UI component library with Styled System
Build a better UI component library with Styled SystemBuild a better UI component library with Styled System
Build a better UI component library with Styled System
 
Spectrum 2015 going online with style - an intro to css
Spectrum 2015   going online with style - an intro to cssSpectrum 2015   going online with style - an intro to css
Spectrum 2015 going online with style - an intro to css
 
CSS_tutorial_2
CSS_tutorial_2CSS_tutorial_2
CSS_tutorial_2
 
CSS_tutorial_2
CSS_tutorial_2CSS_tutorial_2
CSS_tutorial_2
 
CSMess to OOCSS: Refactoring CSS with Object Oriented Design
CSMess to OOCSS: Refactoring CSS with Object Oriented DesignCSMess to OOCSS: Refactoring CSS with Object Oriented Design
CSMess to OOCSS: Refactoring CSS with Object Oriented Design
 
Html frames
Html framesHtml frames
Html frames
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
OOCSS, SMACSS or BEM, what is the question...
OOCSS, SMACSS or BEM, what is the question...OOCSS, SMACSS or BEM, what is the question...
OOCSS, SMACSS or BEM, what is the question...
 

Dernier

Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 

OOCSS Lightening Talk

  • 1. OOCSSAndThe Life-Altering Awesomeness That Is Modular CSS Architecture Julie Cameron | @jewlofthelotus
  • 3. WHAT IS MODULAR CSS ARCHITECTURE? (It’s freaking awesome, that’s what.) ! ! The abstraction of repetition into reusable "objects".
  • 4. FRONTEND OBJECTS Naming Conventions Semantic .content, .news__title, .callNow Presentational .grid__col—-9, .btn—-small Modules with states .btn, .btn—primary, .btn—disabled. Classes vs. IDs vs. Element Selectors Take that, specificity!
  • 5. MODULAR CSS GOALS Modularity (duh) Added new page.Wrote 0 lines of CSS.WIN. Predictability Hey! I know how to construct a new thing! Maintainability Oh, you wanted a big button? .btn--large. BOOM. Scalability I got 99 problems, but specificity ain't one. Flexibility Mixin' & Matchin’ DRY & Organized …ability. That’s just plain smart.
  • 6. MODULAR CSS GOALS Modularity (duh) Added new page.Wrote 0 lines of CSS.WIN. Predictability Hey! I know how to construct a new thing! Maintainability Oh, you wanted a big button? .btn--large. BOOM. Scalability I got 99 problems, but specificity ain't one. Flexibility Mixin' & Matchin’ DRY & Organized …ability. That’s just plain smart. A WHOLE LOT OF WIN!
  • 7. OBJECT COMPOSITION Modifiers & States .media—-inline, .media—-collapsed .media__img—-right Parent - Child Relationships Objects / Modules / Blocks .media .media__img, .media__body
  • 9. STRUCTURE VS SKIN Define repeating visual patterns as reusable skins. Define repeating “invisible” patterns as reusable structures. // Structure .btn { border-radius: 4px; display: inline-block; font-size: 1.25em; padding: 1em; text-align: center; vertical-align: middle; } ! // Skins .btn-primary { background: blue; } .btn-success { background: green; } .btn-info { background: lightblue; } .btn-warning { background: orange; } .btn-danger { background: red; } <button class=“btn btn-primary”></button> <a class=“btn btn-success” href=“#”></a> <input class=“btn btn-info” type=“submit” /> <span class=“btn btn-warning”></span> <label class=“btn btn-danger”></label>
  • 10. CONTAINER VS CONTENT • An Object should look the same no matter where you put it. • AVOID Location-Dependent Styles (which often leads to duplication) .categoryList h2 { // BAD! h2 styles are location // dependent } ! .categoryHeader { // GOOD! We can reuse this header // style anywhere } Assurances • All h2s will look like h2s. • All .categoryHeaders will look like .categoryHeaders <h2 class=“categoryHeader”></h2>
  • 11. BUT CLASSITIS?!? SEMANTICS?!? Is this going to bloat my HTML markup with classes? Yes. Is that a bad thing? Shrug. What about semantics?! It’s complicated.
  • 12. EXAMPLE TIME ! %nav %ul.list--horzRight.list--blockAll %li %a.media--inline %span.media__img.icon-bookmark %span.media__body Bookmark %li.dropdown %a.media--inline %span.media__img.icon-share %span.media__body Share %ul.dropdown__content—-right.list—boxed %li %a.media--block %span.media__img.icon-facebook %span.media__body Facebook %li %a.media--block %span.media__img.icon-twitter %span.media__body Twitter %li %a.media--block %span.media__img.icon-email %span.media__body Email Objects In Use: • List • Media • Dropdown • Icon
  • 14. QUESTIONS? AMA! Slides & Resources: http://bit.ly/sem_oocss ! @jewlofthelotus Girl Develop It Ann Arbor Launch Party w/ Pillar @ The Forge June 4th 6:30pm RSVP @ meetup.com Hey, look! A media object!
  • 15. RESOURCES • https://github.com/stubbornella/oocss/wiki • http://www.smashingmagazine.com/2011/12/12/an-introduction- to-object-oriented-css-oocss/ • http://csswizardry.com/2014/03/naming-ui-components-in-oocss • http://oliverjash.me/2012/09/07/methods-for-modifying-objects-in- oocss.html OOCSS