SlideShare a Scribd company logo
1 of 25
OOCSS Object Orientated CSS
The problem?
BLOAT!
Had 700 CSS files Had 1.9mb of CSS
Have to be an expert in the siteto modify or add
Each new addition to the site, the CSS grows
CSS re-use is almost non-existent
Code is fragile, have to be more specific to not break other peoples styling.CSS specificitybombs!
We make a 1:1 relationship of the CSS & the modules we create
How to get round it? OOCSS
Create your CSS like Lego blocks
Lego blocks can be used to make up many different unique structures from the same elements
Create a Component library http://oocss.org/ex/library.html
Separate container and content Break the dependency between the container module and the content
Build the HTML from the component library
Separate structure and skin Abstract the structure of the block from the skin which is being applied
Lego blocks first Design your individual pages only once you have all the lego blocks in front of you
Rule of thumb If two modules look too similar to include on the same page, they are two similar to have on the site. Choose ONE!
Mix and match Container and content objects to achieve high performance design.
Never specify element DO: 			.class Don’t:	div.class
Be Flexible Extensible height and width.  Let the grid control the width and the content control the height.
Learn to love grids
Mark up and CSS become predictable & consistent
Photo credits http://www.flickr.com/photos/garlandcannon/4558340132/sizes/l/in/photostream/ http://www.flickr.com/photos/shawno/3869415226/sizes/l/in/photostream/ http://www.flickr.com/photos/wakingphotolife/5341066143/sizes/l/in/photostream/ http://www.flickr.com/photos/evaekeblad/454220744/sizes/o/in/photostream/ http://www.flickr.com/photos/builtbydave/4584358158/sizes/l/in/photostream/ http://www.flickr.com/photos/seyerce/342265015/sizes/l/in/photostream/ http://www.flickr.com/photos/aplumb/3890010967/sizes/l/in/photostream/ http://www.flickr.com/photos/teknokool/117340388/sizes/o/in/photostream/ http://www.flickr.com/photos/21561428@N03/4991300232/sizes/l/in/photostream/
More info OOCSS framework - https://github.com/stubbornella/oocss/ Nicole Sullivan’s blog - http://www.stubbornella.org/ Slideshare - http://www.slideshare.net/stubbornella OOCSS.org - http://oocss.org/ Me: Twitter: @drewjford Email: andrew@andrewford.co.nz

More Related Content

What's hot

Word press workshop powerpoint
Word press workshop   powerpointWord press workshop   powerpoint
Word press workshop powerpoint
erezwe
 
UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27
Rafael Alvarado
 
How to build your first WordPress website
How to build your first WordPress websiteHow to build your first WordPress website
How to build your first WordPress website
Andrew Davis
 

What's hot (16)

Making Web Fun
Making Web FunMaking Web Fun
Making Web Fun
 
Word press workshop powerpoint
Word press workshop   powerpointWord press workshop   powerpoint
Word press workshop powerpoint
 
How to make WordPress your friend
How to make WordPress your friendHow to make WordPress your friend
How to make WordPress your friend
 
'Less' css
'Less' css'Less' css
'Less' css
 
Tech Headline - CSS Naming Conventions: Improve your code with OOCSS, SMACSS,...
Tech Headline - CSS Naming Conventions: Improve your code with OOCSS, SMACSS,...Tech Headline - CSS Naming Conventions: Improve your code with OOCSS, SMACSS,...
Tech Headline - CSS Naming Conventions: Improve your code with OOCSS, SMACSS,...
 
WordPress Blogs 101
WordPress Blogs 101WordPress Blogs 101
WordPress Blogs 101
 
What's in a Theme by Sé Reed Media
What's in a Theme by Sé Reed MediaWhat's in a Theme by Sé Reed Media
What's in a Theme by Sé Reed Media
 
Understanding CSS and the Debugging Console
Understanding CSS and the Debugging ConsoleUnderstanding CSS and the Debugging Console
Understanding CSS and the Debugging Console
 
UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27UVA MDST 3703 JavaScript 2012-09-27
UVA MDST 3703 JavaScript 2012-09-27
 
Solving Common Client Requets with jQuery Presentation (v2)
Solving Common Client Requets with jQuery Presentation (v2)Solving Common Client Requets with jQuery Presentation (v2)
Solving Common Client Requets with jQuery Presentation (v2)
 
Blogging 101 for Real Estate
Blogging 101 for Real EstateBlogging 101 for Real Estate
Blogging 101 for Real Estate
 
How to build your first WordPress website
How to build your first WordPress websiteHow to build your first WordPress website
How to build your first WordPress website
 
Newbies, you are not alone
Newbies, you are not aloneNewbies, you are not alone
Newbies, you are not alone
 
What is Modular CSS?
What is Modular CSS?What is Modular CSS?
What is Modular CSS?
 
Using Microsoft Azure as cloud file server
Using Microsoft Azure as cloud file serverUsing Microsoft Azure as cloud file server
Using Microsoft Azure as cloud file server
 
Introduction to web (techie side)
Introduction to web (techie side)Introduction to web (techie side)
Introduction to web (techie side)
 

Viewers also liked

Viewers also liked (7)

OOCSS in the Real World: A Case Study from the CBC
OOCSS in the Real World: A Case Study from the CBCOOCSS in the Real World: A Case Study from the CBC
OOCSS in the Real World: A Case Study from the CBC
 
OOCSS in the Real World: A Case Study from the CBC - Revisited
OOCSS in the Real World: A Case Study from the CBC - RevisitedOOCSS in the Real World: A Case Study from the CBC - Revisited
OOCSS in the Real World: A Case Study from the CBC - Revisited
 
Object Oriented CSS - Joomla!dagen Nederland 2014
Object Oriented CSS - Joomla!dagen Nederland 2014Object Oriented CSS - Joomla!dagen Nederland 2014
Object Oriented CSS - Joomla!dagen Nederland 2014
 
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 ...
 
CSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreCSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and more
 
Object Oriented CSS
Object Oriented CSSObject Oriented CSS
Object Oriented CSS
 
OOCSS and SMACSS Case Study
OOCSS and SMACSS Case StudyOOCSS and SMACSS Case Study
OOCSS and SMACSS Case Study
 

Similar to OOCSS presentation

Lesson 109 23 aug13-1430-ay
Lesson 109 23 aug13-1430-ayLesson 109 23 aug13-1430-ay
Lesson 109 23 aug13-1430-ay
Codecademy Ren
 
Sitting in the Driver's Seat
Sitting in the Driver's SeatSitting in the Driver's Seat
Sitting in the Driver's Seat
Jack Moffett
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
butest
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
butest
 

Similar to OOCSS presentation (20)

Between a Block & a Hard Place
Between a Block & a Hard PlaceBetween a Block & a Hard Place
Between a Block & a Hard Place
 
The CSS Handbook
The CSS HandbookThe CSS Handbook
The CSS Handbook
 
Efficiently theming a multi-site Drupal 8 portal - Drupal Dev Days Seville 2017
Efficiently theming a multi-site Drupal 8 portal - Drupal Dev Days Seville 2017Efficiently theming a multi-site Drupal 8 portal - Drupal Dev Days Seville 2017
Efficiently theming a multi-site Drupal 8 portal - Drupal Dev Days Seville 2017
 
Design and CSS
Design and CSSDesign and CSS
Design and CSS
 
Overview of Using Wordpress for Web Site Design
Overview of Using Wordpress for Web Site DesignOverview of Using Wordpress for Web Site Design
Overview of Using Wordpress for Web Site Design
 
How To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter TemplatesHow To Work Faster & More Profitably With Client Site Starter Templates
How To Work Faster & More Profitably With Client Site Starter Templates
 
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
DRY CSS A don’t-repeat-yourself methodology for creating efficient, unified a...
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
Lesson 109 23 aug13-1430-ay
Lesson 109 23 aug13-1430-ayLesson 109 23 aug13-1430-ay
Lesson 109 23 aug13-1430-ay
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 ThemeMinimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
Minimalist Theming: How to Build a Lean, Mean Drupal 8 Theme
 
The Fast And The Fabulous
The Fast And The FabulousThe Fast And The Fabulous
The Fast And The Fabulous
 
OOCSS
OOCSSOOCSS
OOCSS
 
Sitting in the Driver's Seat
Sitting in the Driver's SeatSitting in the Driver's Seat
Sitting in the Driver's Seat
 
Architecting with Style
Architecting with StyleArchitecting with Style
Architecting with Style
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Framework
FrameworkFramework
Framework
 
Framework
FrameworkFramework
Framework
 
Rock Solid CSS Architecture
Rock Solid CSS ArchitectureRock Solid CSS Architecture
Rock Solid CSS Architecture
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

OOCSS presentation

  • 4. Had 700 CSS files Had 1.9mb of CSS
  • 5. Have to be an expert in the siteto modify or add
  • 6. Each new addition to the site, the CSS grows
  • 7. CSS re-use is almost non-existent
  • 8. Code is fragile, have to be more specific to not break other peoples styling.CSS specificitybombs!
  • 9. We make a 1:1 relationship of the CSS & the modules we create
  • 10. How to get round it? OOCSS
  • 11. Create your CSS like Lego blocks
  • 12. Lego blocks can be used to make up many different unique structures from the same elements
  • 13. Create a Component library http://oocss.org/ex/library.html
  • 14. Separate container and content Break the dependency between the container module and the content
  • 15. Build the HTML from the component library
  • 16. Separate structure and skin Abstract the structure of the block from the skin which is being applied
  • 17. Lego blocks first Design your individual pages only once you have all the lego blocks in front of you
  • 18. Rule of thumb If two modules look too similar to include on the same page, they are two similar to have on the site. Choose ONE!
  • 19. Mix and match Container and content objects to achieve high performance design.
  • 20. Never specify element DO: .class Don’t: div.class
  • 21. Be Flexible Extensible height and width. Let the grid control the width and the content control the height.
  • 22. Learn to love grids
  • 23. Mark up and CSS become predictable & consistent
  • 24. Photo credits http://www.flickr.com/photos/garlandcannon/4558340132/sizes/l/in/photostream/ http://www.flickr.com/photos/shawno/3869415226/sizes/l/in/photostream/ http://www.flickr.com/photos/wakingphotolife/5341066143/sizes/l/in/photostream/ http://www.flickr.com/photos/evaekeblad/454220744/sizes/o/in/photostream/ http://www.flickr.com/photos/builtbydave/4584358158/sizes/l/in/photostream/ http://www.flickr.com/photos/seyerce/342265015/sizes/l/in/photostream/ http://www.flickr.com/photos/aplumb/3890010967/sizes/l/in/photostream/ http://www.flickr.com/photos/teknokool/117340388/sizes/o/in/photostream/ http://www.flickr.com/photos/21561428@N03/4991300232/sizes/l/in/photostream/
  • 25. More info OOCSS framework - https://github.com/stubbornella/oocss/ Nicole Sullivan’s blog - http://www.stubbornella.org/ Slideshare - http://www.slideshare.net/stubbornella OOCSS.org - http://oocss.org/ Me: Twitter: @drewjford Email: andrew@andrewford.co.nz

Editor's Notes

  1. Hi I’m Andrew Ford, I’m a Team leader and UI Developer at Cucumber. On Feburay the 13th I attended a workshop at Webstock calledCSS of the future – Building with Object Orientated CSS. It was run by Nicole Sullivan. She’s worked for the likes of Facebook, Yahoo, Box.net and salesforce.
  2. So you have a large site, with tons of pages and multiple layouts'. Your constantly adding new features, updating old ones, getting multiple people to work on the site who are less familiar with it so on and so on. What happens to your CSS?
  3. You end up with bloat and a poor performing website.
  4. This happened to Facebook. Before Nicole started helping them they had 700 css files, they had 1.9mb of CSS. Prime example of massive CSS gone wrong in about 2007.
  5. With Massive sites you have to be an expert of the site to modify or add to the css
  6. Each feature or module you add the CSS grows
  7. Do you guys know what a specificitybomb is? It’s were you keep adding elements to your styling so no one else on the team can override it.
  8. We make a 1:1 relationship of the CSS and the modules we create soon enough we’ve doubled or tripled the size of the CSS, and were struggling to make changes due to all the bugs we create.