SlideShare a Scribd company logo
SCALABLE CSS
Part 1 of 3: An origin Story.
1
Overview
4 The Early Days
4 Uncovering the Possibilities of CSS
4 Borrowing from OOP
...
4 Embracing the Global Namespace
4 Embracing Killing the Global Namespace
2
The Early Days
3
Before CSS
4 ~1960
4 1989
4 1991
4 1993
4
Before CSS
4 ~1960, OOP Principles are
founded.
4 1989
4 1991
4 1993
5
Before CSS
4 ~1960, OOP Principles are
founded.
4 1989, The Web is born.
4 1991
4 1993
6
Before CSS
4 ~1960, OOP Principles are
founded.
4 1989, The Web is born.
4 1991, The first Website goes live
4 1993
7
Before CSS
4 ~1960, OOP Principles are
founded.
4 1989, The Web is born.
4 1991, The first website goes live.
4 1993, Mosaic web browser is
released.
8
No, Craigslist was not the first
website...
9
But close enough...
10
It's not a bug -- it's a rendering choice made by
the browser. As we kneel before the altar of the
"ha ha, you can't control what your documents
look like in HTML
...
In fact, it has been a constant source of delight
for me over the past year to get to continually
tell hordes(literally) of people who want to --
strap yourselves in, here it comes -- control
what their documents look like
...
Sorry, you're screwed.
Marc
11
The Arrival of CSS
4 1994
4 1996
12
The Arrival of CSS
4 1994, Hakon Wium Lie proposes
the idea of CSS while working
with Tim Berners-Lee.
4 1996
13
The Arrival of CSS
4 1994, Hakon Wium Lie proposes
the idea of CSS while working
with Tim Berners-Lee.
4 1996, The first CCS1 spec
becomes official.
14
“The CSS1 language is human
readable and writable, and expresses
style in common desktop publishing
terminology.” -- W3Org
15
Recap
4 CSS1 spec becomes official December 17, 1996.
4 CSS draws it's influence from desktop publishing
software. (Not OOP).
4 CSS is created out of the necessity to make things
look good.
16
Uncovering the Possibilities
of CSS
17
What is CSS Really Capable of?
4 2003
18
What is CSS Really Capable of?
4 2003, Dave Shea launches the
CSS Zen Garden
19
20
21
2004
O'Reilly Media popularizes the term Web 2.0
22
2006
SASS (CSS in Ruby)
23
Borrowing from OOP
24
OOP Principles
4 DRY
4 Encapsulate what changes
4 Open Closed Design Principle
4 Single Responsibility Principle
(SRP)
25
Tabs
26
#EditorSidePanel .tabs {
border-bottom: 1px solid #d2d5d6;
height: 45px;
display: flex;
align-items: stretch;
padding: 10px 0 0;
}
#EditorSidePanel .tabs span {
display: inline-block;
font-weight: 400;
text-decoration: none;
padding: 0 10px;
text-align: center;
color: #0086bf;
font-weight: 600;
border-bottom: 5px solid #0086bf;
}
#EditorSidePanel .tabs a {
display: inline-block;
font-weight: 400;
text-decoration: none;
padding: 0 10px;
flex: 1 0 85px;
text-align: center;
}
27
Tabs HTML
<div id="EditorSidePanel">
<div class="tabs">
<span>STEPS</span>
<a>DOCUMENTS</a>
<a>COMMENTS</a>
</div>
</div>
28
Tabs CSS
4 ...
29
Tabs CSS
4 Is it DRY?
30
Tabs CSS
4 Is it DRY?
4 Is the functionality
encapsulated?
31
Tabs CSS
4 Is it DRY?
4 Is the functionality
encapsulated?
4 Is it open for extension?
32
Tabs CSS
4 Is it DRY?
4 Is the functionality
encapsulated?
4 Is it open for extension?
4 Does it serve a single
responsibility?
33
An object should look the same no matter where you put it
-- Nicole Sullivan
34
OOCSS
1. Separate Structure and Skin
2. Separate Container and Content
35
Tabs Challenge
4 Using the concepts of OOCSS
how might we refactor this
code?
4 What principles of OOP apply?
36
.pa-tabs {
border-bottom: 1px solid #d2d5d6;
height: 45px;
display: flex;
align-items: stretch;
padding: 10px 0 0;
}
.pa-tab {
font-weight: 400;
padding: 0 10px;
text-align: center;
}
.pa-tab-is-active {
color: #0086bf;
font-weight: 600;
border-bottom: 5px solid #0086bf;
}
37
The Rule of 3 does not apply to
Common UI Elements
38
Recap
4 Web 2.0 shifts the thinking from static to dynamic.
4 SASS extends the way CSS is written.
4 Modular CSS concepts begin to formalize.
39
2010 +
...to be continued
40
41

More Related Content

PPTX
CSS Flexbox (flexible box layout)
PDF
[WebVisions 2010] CSS3 Workshop (Afternoon)
PDF
CSS3 3D Workshop
PDF
[Worskhop Summits] CSS3 Workshop
KEY
RWD in the Wild
PDF
The Future of CSS
KEY
The web standards gentleman: a matter of (evolving) standards)
KEY
Object Oriented CSS
CSS Flexbox (flexible box layout)
[WebVisions 2010] CSS3 Workshop (Afternoon)
CSS3 3D Workshop
[Worskhop Summits] CSS3 Workshop
RWD in the Wild
The Future of CSS
The web standards gentleman: a matter of (evolving) standards)
Object Oriented CSS

Similar to Scalable CSS | An Origin Story. (Part 1 of 3) (20)

PDF
[heweb11] CSS3 Makeover
PDF
Design and CSS
PDF
Accelerated grid theming using NineSixty (Drupal Design Camp Boston 2009)
KEY
CSS3: stay tuned for style
PDF
Css masterclass book
PDF
Simply Responsive CSS3
PDF
CSS3: Ripe and Ready to Respond
KEY
CSS3: the new style council
PPT
CSS Frameworks: Faster Layout, Consistent Results
PDF
Look ma! No images!
PDF
Http _css-tricks
PDF
Accelerated grid theming using NineSixty (DrupalCamp Dallas)
PDF
Accelerated Grid Theming
PDF
Introduction to Responsive Design v.2
PPTX
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
PDF
CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer
KEY
Topsy Turvy Design
PDF
CSS Best Practices
PDF
The Future Of CSS
PDF
Intro to CSS3
[heweb11] CSS3 Makeover
Design and CSS
Accelerated grid theming using NineSixty (Drupal Design Camp Boston 2009)
CSS3: stay tuned for style
Css masterclass book
Simply Responsive CSS3
CSS3: Ripe and Ready to Respond
CSS3: the new style council
CSS Frameworks: Faster Layout, Consistent Results
Look ma! No images!
Http _css-tricks
Accelerated grid theming using NineSixty (DrupalCamp Dallas)
Accelerated Grid Theming
Introduction to Responsive Design v.2
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}
CSS: The Definitive Guide, 5th Edition (Early Release) Eric Meyer
Topsy Turvy Design
CSS Best Practices
The Future Of CSS
Intro to CSS3
Ad

Recently uploaded (20)

PPTX
Transform Your Business with a Software ERP System
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
DOCX
Looking for a Tableau Alternative Try Helical Insight Open Source BI Platform...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Mini project ppt template for panimalar Engineering college
PPT
JAVA ppt tutorial basics to learn java programming
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Digital Strategies for Manufacturing Companies
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Understanding NFT Marketplace Development_ Trends and Innovations.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Introduction to Artificial Intelligence
Transform Your Business with a Software ERP System
ManageIQ - Sprint 268 Review - Slide Deck
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
Softaken Excel to vCard Converter Software.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Which alternative to Crystal Reports is best for small or large businesses.pdf
Looking for a Tableau Alternative Try Helical Insight Open Source BI Platform...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Online Work Permit System for Fast Permit Processing
Mini project ppt template for panimalar Engineering college
JAVA ppt tutorial basics to learn java programming
How Creative Agencies Leverage Project Management Software.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Digital Strategies for Manufacturing Companies
2025 Textile ERP Trends: SAP, Odoo & Oracle
Understanding NFT Marketplace Development_ Trends and Innovations.pdf
Essential Infomation Tech presentation.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Introduction to Artificial Intelligence
Ad

Scalable CSS | An Origin Story. (Part 1 of 3)

  • 1. SCALABLE CSS Part 1 of 3: An origin Story. 1
  • 2. Overview 4 The Early Days 4 Uncovering the Possibilities of CSS 4 Borrowing from OOP ... 4 Embracing the Global Namespace 4 Embracing Killing the Global Namespace 2
  • 4. Before CSS 4 ~1960 4 1989 4 1991 4 1993 4
  • 5. Before CSS 4 ~1960, OOP Principles are founded. 4 1989 4 1991 4 1993 5
  • 6. Before CSS 4 ~1960, OOP Principles are founded. 4 1989, The Web is born. 4 1991 4 1993 6
  • 7. Before CSS 4 ~1960, OOP Principles are founded. 4 1989, The Web is born. 4 1991, The first Website goes live 4 1993 7
  • 8. Before CSS 4 ~1960, OOP Principles are founded. 4 1989, The Web is born. 4 1991, The first website goes live. 4 1993, Mosaic web browser is released. 8
  • 9. No, Craigslist was not the first website... 9
  • 11. It's not a bug -- it's a rendering choice made by the browser. As we kneel before the altar of the "ha ha, you can't control what your documents look like in HTML ... In fact, it has been a constant source of delight for me over the past year to get to continually tell hordes(literally) of people who want to -- strap yourselves in, here it comes -- control what their documents look like ... Sorry, you're screwed. Marc 11
  • 12. The Arrival of CSS 4 1994 4 1996 12
  • 13. The Arrival of CSS 4 1994, Hakon Wium Lie proposes the idea of CSS while working with Tim Berners-Lee. 4 1996 13
  • 14. The Arrival of CSS 4 1994, Hakon Wium Lie proposes the idea of CSS while working with Tim Berners-Lee. 4 1996, The first CCS1 spec becomes official. 14
  • 15. “The CSS1 language is human readable and writable, and expresses style in common desktop publishing terminology.” -- W3Org 15
  • 16. Recap 4 CSS1 spec becomes official December 17, 1996. 4 CSS draws it's influence from desktop publishing software. (Not OOP). 4 CSS is created out of the necessity to make things look good. 16
  • 18. What is CSS Really Capable of? 4 2003 18
  • 19. What is CSS Really Capable of? 4 2003, Dave Shea launches the CSS Zen Garden 19
  • 20. 20
  • 21. 21
  • 22. 2004 O'Reilly Media popularizes the term Web 2.0 22
  • 23. 2006 SASS (CSS in Ruby) 23
  • 25. OOP Principles 4 DRY 4 Encapsulate what changes 4 Open Closed Design Principle 4 Single Responsibility Principle (SRP) 25
  • 27. #EditorSidePanel .tabs { border-bottom: 1px solid #d2d5d6; height: 45px; display: flex; align-items: stretch; padding: 10px 0 0; } #EditorSidePanel .tabs span { display: inline-block; font-weight: 400; text-decoration: none; padding: 0 10px; text-align: center; color: #0086bf; font-weight: 600; border-bottom: 5px solid #0086bf; } #EditorSidePanel .tabs a { display: inline-block; font-weight: 400; text-decoration: none; padding: 0 10px; flex: 1 0 85px; text-align: center; } 27
  • 28. Tabs HTML <div id="EditorSidePanel"> <div class="tabs"> <span>STEPS</span> <a>DOCUMENTS</a> <a>COMMENTS</a> </div> </div> 28
  • 30. Tabs CSS 4 Is it DRY? 30
  • 31. Tabs CSS 4 Is it DRY? 4 Is the functionality encapsulated? 31
  • 32. Tabs CSS 4 Is it DRY? 4 Is the functionality encapsulated? 4 Is it open for extension? 32
  • 33. Tabs CSS 4 Is it DRY? 4 Is the functionality encapsulated? 4 Is it open for extension? 4 Does it serve a single responsibility? 33
  • 34. An object should look the same no matter where you put it -- Nicole Sullivan 34
  • 35. OOCSS 1. Separate Structure and Skin 2. Separate Container and Content 35
  • 36. Tabs Challenge 4 Using the concepts of OOCSS how might we refactor this code? 4 What principles of OOP apply? 36
  • 37. .pa-tabs { border-bottom: 1px solid #d2d5d6; height: 45px; display: flex; align-items: stretch; padding: 10px 0 0; } .pa-tab { font-weight: 400; padding: 0 10px; text-align: center; } .pa-tab-is-active { color: #0086bf; font-weight: 600; border-bottom: 5px solid #0086bf; } 37
  • 38. The Rule of 3 does not apply to Common UI Elements 38
  • 39. Recap 4 Web 2.0 shifts the thinking from static to dynamic. 4 SASS extends the way CSS is written. 4 Modular CSS concepts begin to formalize. 39
  • 40. 2010 + ...to be continued 40
  • 41. 41