SlideShare a Scribd company logo
1 of 66
Download to read offline
The Back(side) of the Class
aka The Inflammatory but Reasonably Politically Correct
“It Depends” Talk
Stephen Hay, CSS Day 2015
Warning: I’m going to make
fun of your pet CSS
methodology.
< d i v c l a s s = " l - h e a d e r " >
< d i v c l a s s = " l - c o n s t r a i n e d " >
< d i v c l a s s = " l o g o " >
< h 2 c l a s s = " h d " > < a h r e f = " / " > < s p a n c l a s s = " h d - l i n e h d - l i n e 1 "
< h 3 > A f l e x i b l e g u i d e t o d e v e l o p i n g s i t e s s m a l l a n d l a r g e .
< / d i v >
< / d i v >
< / d i v >
view-source:https://smacss.com/
< d i v c l a s s = " u n i t s i z e 1 o f 3 " >
< d i v c l a s s = " m o d " >
< b c l a s s = " t o p " > < b c l a s s = " t l " > < / b > < b c l a s s = " t r " > < / b > < / b >
< d i v c l a s s = " i n n e r " >
< d i v c l a s s = " h d " >
< h 3 > m o d < / h 3 >
< / d i v >
< d i v c l a s s = " b d " >
< p > < / p >
< u l c l a s s = " s i m p l e L i s t " >
. . .
< / u l >
< / d i v >
< / d i v >
< b c l a s s = " b o t t o m " > < b c l a s s = " b l " > < / b > < b c l a s s = " b r " > < / b > < / b >
< / d i v >
< / d i v >
view-source:http://oocss.org/module.html
< d i v i d = " m e n u " c l a s s = " n a v b a r _ _ c o l l a p s e c o l l a p s e " >
< u l c l a s s = " n a v n a v b a r _ _ n a v " >
< l i c l a s s = " n a v _ _ i t e m n a v _ _ i t e m _ a c t i v e " > < a h r e f = " / i n t r o d u c t i o n / "
< l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / n a m i n g / " c l a s s = " n a v _ _ l i n k " > N a m i n g
< l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / f a q / " c l a s s = " n a v _ _ l i n k " > F A Q < / a > < / l i >
< / u l >
< / d i v >
view-source:http://getbem.com/introduction/
< d i v c l a s s = " R o w " >
< d i v c l a s s = " F l ( s t a r t ) W ( 1 / 2 ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v >
< d i v c l a s s = " F l ( s t a r t ) W ( 1 / 2 ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v >
< / d i v >
< d i v c l a s s = " D ( t b ) W ( 1 0 0 % ) " r o l e = " p r e s e n t a t i o n " >
< d i v c l a s s = " D ( t b c ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v >
< d i v c l a s s = " D ( t b c ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v >
< / d i v >
< d i v c l a s s = " I b B o x W ( 5 0 % ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v > < ! - -
- - > < d i v c l a s s = " I b B o x W ( 5 0 % ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v >
< d i v c l a s s = " D ( f ) " >
< d i v c l a s s = " F l x g ( 1 ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v >
< d i v c l a s s = " F l x g ( 1 ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v >
< / d i v >
http://acss.io/
<font></font>
OOCSS
SMACSS
ITCSS
BEM
ACSS
Bem smacss itcss acss.
Please don’t be offended
It’s good to think critically about the tools and methods we
use, and how we use them. This says nothing about their
value when applied to specific problems.
Why are there so many
frameworks and
“methodologies”?
Because different people are solving different problems.
OOCSS
Yahoo, Facebook
SMACSS
Yahoo, Shopify
BEM
Yandex
These problems are not necessarily your problems.
There is another reason many of us appropriate other
people’s solutions to their own problems…
We are obsessed with our tools.
“Tools don’t solve problems any more, they have become the
problem.”
— PPK, http://www.quirksmode.org/blog/archives/2015/05/tools_dont_solv.html
Some hefty claims are made
about these methodologies
Faster parsing / Performance
CSS is not as “tightly coupled” to the markup
More maintainable, less refactoring
Performance
Steve Souders on “complex” selectors:
“For most web sites, the possible performance gains from
optimizing CSS selectors will be small, and are not worth the
costs.”
“It only becomes a factor if you have a large number of DOM
elements and complex CSS selectors: If you have 20K DOM
elements and 200 complex selectors, it could be bad. If you
have 2K DOM elements and 2K complex selectors, it could be
bad. But most pages have 900 DOM elements and ~50
complex selectors (based on anecdotal data). Optimizing
those 50 complex selectors will not produce a noticeable
improvement in performance.”
“Tight coupling”
< n a v >
< u l >
< l i > < a h r e f = " / i n t r o d u c t i o n / " > I n t r o d u c t i o n < / a > < / l i >
< l i > < a h r e f = " / n a m i n g / " > N a m i n g < / a > < / l i >
< l i > < a h r e f = " / f a q / " > F A Q < / a > < / l i >
< / u l >
< / n a v >
n a v l i {
. . .
}
Not coupled?
< u l c l a s s = " n a v n a v b a r _ _ n a v " >
< l i c l a s s = " n a v _ _ i t e m n a v _ _ i t e m _ a c t i v e " > < a h r e f = " / i n t r o d u c t i o n / " c l a s s =
< l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / n a m i n g / " c l a s s = " n a v _ _ l i n k " > N a m i n g
< l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / f a q / " c l a s s = " n a v _ _ l i n k " > F A Q < / a > < / l i >
< / u l >
. n a v _ _ i t e m {
. . .
}
Less refactoring?
It’s true. But HTML is now your closet.
Now you can do all that refactoring in your HTML. (But at
least it’s not in your CSS!)
Some possible problems
We’re trying to approach CSS as if it
were a programming language.
50 Lies Programmers Believe, no. 20
CSS can be “object-oriented” or “functional” rather than a
declarative rules language with a moderately complex
inheritance model.
— Tom Morris, https://tommorris.org/posts/9317
https://www.flickr.com/photos/epublicist/3546059144
Most of the problems class-based
methods solve are problems that we
caused in the first place.
Modules and inheritance
< d i v c l a s s = " c o n t a c t p e r s o o n t e a s e r " >
. . .
< / d i v >
. c o n t a c t p e r s o o n {
. . .
}
. c o n t a c t p e r s o o n . t e a s e r {
. . .
}
. c o n t a c t p e r s o o n . o v e r v i e w {
. . .
}
“Modularization encourages over-design.”
— John Daggett
“However, when it comes to larger, more complex projects,
how you organize your code is a key to efficiency. Not only in
how much time it takes, but also in how much code you write,
and how much a browser has to load. This is especially
important when you’re working with a team of themers, and
when performance is important.”
— http://getbem.com/introduction/
class-based “methodologies” will
not solve your organisational
problems.
We’re teaching people that these
methods are the “correct” way to
approach writing CSS.
Stackoverflow CSS question about Bootstrap
We “need” an increasing number of
tools, frameworks, methods and
dependencies to do our jobs.
I want to write some CSS
CSS
Sass/LESS/Flavor-of-the-month
Susy
Autoprefixer
Minify
Grunt
Node.js/npm
?
We want a magical methodology that
works for every project.
Large-scale, complex
Enterprise
From the companies that brought you waterfall processes
and ridiculously complex charts and graphs.
All of us are right, respectively.
My name is Stephen, and I added these
to a project to meet a client’s needs.
. w h o l e
. h a l f
. t h i r d s
. f i r s t
. l a s t
. h i g h l i g h t
These problems we’re having are real problems, and tools
and methodologies do help solve some of them. It’s our job
to think critically about which problems we’re trying to
solve, and which tools and methods are necessary to that
specific purpose.
In other words, there are no best practices.
Some thoughts
Inheritance is powerful. Are you sure
you don’t want it?
Embrace the chaos.
The Web is messy. Projects are messy. Development is
messy.
And that’s okay. What’s right for this project?
Start simply
What if we started our projects with nothing but plain CSS,
and only added tools and methodologies when absolutely
necessary and not as a default?
Respect the content, seek
independence
. n a v {
. . .
}
. n a v b a r _ _ n a v {
. . .
}
< u l c l a s s = " n a v n a v b a r _ _ n a v " >
< / u l >
https://vimeo.com/128473203
http://alistapart.com/article/axiomatic-css-and-
lobotomized-owls
Refactoring is a good thing
None of us write perfect code the very first time.
“Refactoring isn’t rework. It is revision, but it isn’t doing the
work over.”
— Ron Jeffries, http://www.ronjeffries.com/xprog/classics/refactoringisntrework/
Documentation
Namespaces are not enough. Code comments are not
enough. If you want people to understand the logic behind
your approach to a given project’s CSS, you need to write
documentation for people.
Asciidoctor.org
Stop teaching people that this is how
you write CSS
There is no particular “right” way to write CSS.
HTML and CSS are often difficult enough without all the
layers of abstraction and complexity that we add with our
pet frameworks.
Keep things simple.
Respect the content.
Think critically.
Thank you!
@stephenhay
the-haystack.com
responsivedesignworkflow.com

More Related Content

What's hot

Web應用程式以及資安問題的探討
Web應用程式以及資安問題的探討Web應用程式以及資安問題的探討
Web應用程式以及資安問題的探討Mu Chun Wang
 
Library Program Technology in Ukraine & Romania
Library Program Technology in Ukraine & RomaniaLibrary Program Technology in Ukraine & Romania
Library Program Technology in Ukraine & RomaniaMark Belinsky
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える拓樹 谷
 
Getting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappGetting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappFrancois Marier
 
Sketch up errors and warnings sketchup help
Sketch up errors and warnings   sketchup helpSketch up errors and warnings   sketchup help
Sketch up errors and warnings sketchup helpJaime Honigman
 
C E N T R A R E L´ I M M A G G I N E
C E N T R A R E  L´ I M M A G G I N EC E N T R A R E  L´ I M M A G G I N E
C E N T R A R E L´ I M M A G G I N Eguest70f0f3dc
 
Help mijn website is gehackt - Joomla User Group Den Bosch 2014
Help mijn website is gehackt - Joomla User Group Den Bosch 2014Help mijn website is gehackt - Joomla User Group Den Bosch 2014
Help mijn website is gehackt - Joomla User Group Den Bosch 2014Peter Martin
 
Lesson1 - Fall 2013
Lesson1 - Fall 2013Lesson1 - Fall 2013
Lesson1 - Fall 2013hstryk
 
Plan your web site like you plan your parties
Plan your web site like you plan your partiesPlan your web site like you plan your parties
Plan your web site like you plan your partiesChristian Heilmann
 
cashing scheme for WWW - 1997
cashing scheme for WWW - 1997cashing scheme for WWW - 1997
cashing scheme for WWW - 1997sylvain Lamblot
 
How to Plan Purple Team Exercises
How to Plan Purple Team ExercisesHow to Plan Purple Team Exercises
How to Plan Purple Team ExercisesHaydn Johnson
 
PT_OWASP_AUSTIN_2017
PT_OWASP_AUSTIN_2017PT_OWASP_AUSTIN_2017
PT_OWASP_AUSTIN_2017Haydn Johnson
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)Stoyan Stefanov
 
5 january to 11 january 2015 12 18 nav. 12
5 january to 11  january 2015 12 18 nav. 125 january to 11  january 2015 12 18 nav. 12
5 january to 11 january 2015 12 18 nav. 12snehalcnp
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書拓樹 谷
 
Word press高级教程.pdf
Word press高级教程.pdfWord press高级教程.pdf
Word press高级教程.pdfyyrj
 

What's hot (20)

Web應用程式以及資安問題的探討
Web應用程式以及資安問題的探討Web應用程式以及資安問題的探討
Web應用程式以及資安問題的探討
 
Library Program Technology in Ukraine & Romania
Library Program Technology in Ukraine & RomaniaLibrary Program Technology in Ukraine & Romania
Library Program Technology in Ukraine & Romania
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える
 
Getting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your WebappGetting Browsers to Improve the Security of Your Webapp
Getting Browsers to Improve the Security of Your Webapp
 
HTML-Bangla E-book
HTML-Bangla E-bookHTML-Bangla E-book
HTML-Bangla E-book
 
Sketch up errors and warnings sketchup help
Sketch up errors and warnings   sketchup helpSketch up errors and warnings   sketchup help
Sketch up errors and warnings sketchup help
 
C E N T R A R E L´ I M M A G G I N E
C E N T R A R E  L´ I M M A G G I N EC E N T R A R E  L´ I M M A G G I N E
C E N T R A R E L´ I M M A G G I N E
 
Programming Language (chapter 5 for class 11 and 12)
Programming Language (chapter 5 for class 11 and 12)Programming Language (chapter 5 for class 11 and 12)
Programming Language (chapter 5 for class 11 and 12)
 
Help mijn website is gehackt - Joomla User Group Den Bosch 2014
Help mijn website is gehackt - Joomla User Group Den Bosch 2014Help mijn website is gehackt - Joomla User Group Den Bosch 2014
Help mijn website is gehackt - Joomla User Group Den Bosch 2014
 
Html + wordpress ppt.
Html + wordpress ppt.Html + wordpress ppt.
Html + wordpress ppt.
 
Lesson1 - Fall 2013
Lesson1 - Fall 2013Lesson1 - Fall 2013
Lesson1 - Fall 2013
 
Plan your web site like you plan your parties
Plan your web site like you plan your partiesPlan your web site like you plan your parties
Plan your web site like you plan your parties
 
cashing scheme for WWW - 1997
cashing scheme for WWW - 1997cashing scheme for WWW - 1997
cashing scheme for WWW - 1997
 
How to Plan Purple Team Exercises
How to Plan Purple Team ExercisesHow to Plan Purple Team Exercises
How to Plan Purple Team Exercises
 
PT_OWASP_AUSTIN_2017
PT_OWASP_AUSTIN_2017PT_OWASP_AUSTIN_2017
PT_OWASP_AUSTIN_2017
 
High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)High Performance Kick Ass Web Apps (JavaScript edition)
High Performance Kick Ass Web Apps (JavaScript edition)
 
5 january to 11 january 2015 12 18 nav. 12
5 january to 11  january 2015 12 18 nav. 125 january to 11  january 2015 12 18 nav. 12
5 january to 11 january 2015 12 18 nav. 12
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書
 
Word press高级教程.pdf
Word press高级教程.pdfWord press高级教程.pdf
Word press高级教程.pdf
 
BrightonSEO
BrightonSEOBrightonSEO
BrightonSEO
 

Similar to The Back(side) of the Class: A Flexible Guide to Critically Evaluating CSS Methodologies

CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)Igalia
 
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar PradhanAwesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar PradhanAjeet Singh Raina
 
PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!Blanca Mancilla
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesOSCON Byrum
 
톰캣 #05+a-배치-parallel deployment
톰캣 #05+a-배치-parallel deployment톰캣 #05+a-배치-parallel deployment
톰캣 #05+a-배치-parallel deploymentGyuSeok Lee
 
Using Phing for Fun and Profit
Using Phing for Fun and ProfitUsing Phing for Fun and Profit
Using Phing for Fun and ProfitNicholas Jansma
 
The New Stone V3 Simulations Path with Notes
The New Stone V3 Simulations Path with NotesThe New Stone V3 Simulations Path with Notes
The New Stone V3 Simulations Path with NotesBrij Consulting, LLC
 
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...Mario Heiderich
 
The Expanding Boundaries of CSS
The Expanding Boundaries of CSSThe Expanding Boundaries of CSS
The Expanding Boundaries of CSSchriseppstein
 
Scaling Saved Searches at eBay Kleinanzeigen
Scaling Saved Searches at eBay KleinanzeigenScaling Saved Searches at eBay Kleinanzeigen
Scaling Saved Searches at eBay KleinanzeigenAndre Charton
 
Ark in Glass V2 Secant Wheel Applications
Ark in Glass V2 Secant Wheel ApplicationsArk in Glass V2 Secant Wheel Applications
Ark in Glass V2 Secant Wheel ApplicationsBrij Consulting, LLC
 
Ark in Glass v3 Driving the Instance
Ark in Glass v3 Driving the InstanceArk in Glass v3 Driving the Instance
Ark in Glass v3 Driving the InstanceBrij Consulting, LLC
 
Geb for Testing Your Grails Application GR8Conf India 2016
Geb for Testing Your Grails Application  GR8Conf India 2016Geb for Testing Your Grails Application  GR8Conf India 2016
Geb for Testing Your Grails Application GR8Conf India 2016Jacob Aae Mikkelsen
 
Class 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designClass 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designErin M. Kidwell
 

Similar to The Back(side) of the Class: A Flexible Guide to Critically Evaluating CSS Methodologies (20)

CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
 
Juggling
JugglingJuggling
Juggling
 
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar PradhanAwesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
Awesome Traefik - Ingress Controller for Kubernetes - Swapnasagar Pradhan
 
PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!PyLadies Talk: Learn to love the command line!
PyLadies Talk: Learn to love the command line!
 
Using Core Themes in Drupal 8
Using Core Themes in Drupal 8Using Core Themes in Drupal 8
Using Core Themes in Drupal 8
 
Use atomic design ftw
Use atomic design ftwUse atomic design ftw
Use atomic design ftw
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypes
 
Juggling
JugglingJuggling
Juggling
 
톰캣 #05+a-배치-parallel deployment
톰캣 #05+a-배치-parallel deployment톰캣 #05+a-배치-parallel deployment
톰캣 #05+a-배치-parallel deployment
 
Using Phing for Fun and Profit
Using Phing for Fun and ProfitUsing Phing for Fun and Profit
Using Phing for Fun and Profit
 
Geb for browser automation
Geb for browser automationGeb for browser automation
Geb for browser automation
 
The New Stone V3 Simulations Path with Notes
The New Stone V3 Simulations Path with NotesThe New Stone V3 Simulations Path with Notes
The New Stone V3 Simulations Path with Notes
 
The New Stone V3 Simulations Path
The New Stone V3 Simulations PathThe New Stone V3 Simulations Path
The New Stone V3 Simulations Path
 
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
Copy & Pest - A case-study on the clipboard, blind trust and invisible cross-...
 
The Expanding Boundaries of CSS
The Expanding Boundaries of CSSThe Expanding Boundaries of CSS
The Expanding Boundaries of CSS
 
Scaling Saved Searches at eBay Kleinanzeigen
Scaling Saved Searches at eBay KleinanzeigenScaling Saved Searches at eBay Kleinanzeigen
Scaling Saved Searches at eBay Kleinanzeigen
 
Ark in Glass V2 Secant Wheel Applications
Ark in Glass V2 Secant Wheel ApplicationsArk in Glass V2 Secant Wheel Applications
Ark in Glass V2 Secant Wheel Applications
 
Ark in Glass v3 Driving the Instance
Ark in Glass v3 Driving the InstanceArk in Glass v3 Driving the Instance
Ark in Glass v3 Driving the Instance
 
Geb for Testing Your Grails Application GR8Conf India 2016
Geb for Testing Your Grails Application  GR8Conf India 2016Geb for Testing Your Grails Application  GR8Conf India 2016
Geb for Testing Your Grails Application GR8Conf India 2016
 
Class 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web designClass 4 handout two column layout w mobile web design
Class 4 handout two column layout w mobile web design
 

More from Stephen Hay

From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to ClarityStephen Hay
 
The Art of Deception
The Art of DeceptionThe Art of Deception
The Art of DeceptionStephen Hay
 
Sculpting Text: Easing the Pain of Designing in the Browser
Sculpting Text: Easing the Pain of Designing in the BrowserSculpting Text: Easing the Pain of Designing in the Browser
Sculpting Text: Easing the Pain of Designing in the BrowserStephen Hay
 
Power Tools For Browser-Based Design
Power Tools For Browser-Based DesignPower Tools For Browser-Based Design
Power Tools For Browser-Based DesignStephen Hay
 
UIE Virtual Seminar: Responsive Web Design Workflow
UIE Virtual Seminar: Responsive Web Design WorkflowUIE Virtual Seminar: Responsive Web Design Workflow
UIE Virtual Seminar: Responsive Web Design WorkflowStephen Hay
 
Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)
Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)
Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)Stephen Hay
 
Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)
Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)
Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)Stephen Hay
 
The New Photoshop, Part 2: The Revenge of the Web (FEC13)
The New Photoshop, Part 2: The Revenge of the Web (FEC13)The New Photoshop, Part 2: The Revenge of the Web (FEC13)
The New Photoshop, Part 2: The Revenge of the Web (FEC13)Stephen Hay
 
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Stephen Hay
 
The New Photoshop, Part 2: The Revenge of the Web
The New Photoshop, Part 2: The Revenge of the WebThe New Photoshop, Part 2: The Revenge of the Web
The New Photoshop, Part 2: The Revenge of the WebStephen Hay
 
Style Guides Are The New Photoshop (Smashing Conference 2012)
Style Guides Are The New Photoshop (Smashing Conference 2012)Style Guides Are The New Photoshop (Smashing Conference 2012)
Style Guides Are The New Photoshop (Smashing Conference 2012)Stephen Hay
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Stephen Hay
 
Responsive Design Workflow: Webshaped 2012
Responsive Design Workflow: Webshaped 2012Responsive Design Workflow: Webshaped 2012
Responsive Design Workflow: Webshaped 2012Stephen Hay
 
Responsive Design Workflow: Mobilism 2012
Responsive Design Workflow: Mobilism 2012Responsive Design Workflow: Mobilism 2012
Responsive Design Workflow: Mobilism 2012Stephen Hay
 
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)Stephen Hay
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The FlowStephen Hay
 
Fronteers Workshop: Rabid Prototyping
Fronteers Workshop: Rabid PrototypingFronteers Workshop: Rabid Prototyping
Fronteers Workshop: Rabid PrototypingStephen Hay
 
Meta layout: a closer look at media queries
Meta layout: a closer look at media queriesMeta layout: a closer look at media queries
Meta layout: a closer look at media queriesStephen Hay
 
Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Stephen Hay
 
HTML5 & Webrichtlijnen 2
HTML5 & Webrichtlijnen 2HTML5 & Webrichtlijnen 2
HTML5 & Webrichtlijnen 2Stephen Hay
 

More from Stephen Hay (20)

From Deception to Clarity
From Deception to ClarityFrom Deception to Clarity
From Deception to Clarity
 
The Art of Deception
The Art of DeceptionThe Art of Deception
The Art of Deception
 
Sculpting Text: Easing the Pain of Designing in the Browser
Sculpting Text: Easing the Pain of Designing in the BrowserSculpting Text: Easing the Pain of Designing in the Browser
Sculpting Text: Easing the Pain of Designing in the Browser
 
Power Tools For Browser-Based Design
Power Tools For Browser-Based DesignPower Tools For Browser-Based Design
Power Tools For Browser-Based Design
 
UIE Virtual Seminar: Responsive Web Design Workflow
UIE Virtual Seminar: Responsive Web Design WorkflowUIE Virtual Seminar: Responsive Web Design Workflow
UIE Virtual Seminar: Responsive Web Design Workflow
 
Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)
Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)
Flexbox: One Giant Leap for Web Layout (Breaking Development 2013)
 
Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)
Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)
Flexbox: One Giant Leap for Web Layout (GenerateConf 2013)
 
The New Photoshop, Part 2: The Revenge of the Web (FEC13)
The New Photoshop, Part 2: The Revenge of the Web (FEC13)The New Photoshop, Part 2: The Revenge of the Web (FEC13)
The New Photoshop, Part 2: The Revenge of the Web (FEC13)
 
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
Flexbox: One Giant Leap for Web Layout (CSS Day 2013)
 
The New Photoshop, Part 2: The Revenge of the Web
The New Photoshop, Part 2: The Revenge of the WebThe New Photoshop, Part 2: The Revenge of the Web
The New Photoshop, Part 2: The Revenge of the Web
 
Style Guides Are The New Photoshop (Smashing Conference 2012)
Style Guides Are The New Photoshop (Smashing Conference 2012)Style Guides Are The New Photoshop (Smashing Conference 2012)
Style Guides Are The New Photoshop (Smashing Conference 2012)
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
 
Responsive Design Workflow: Webshaped 2012
Responsive Design Workflow: Webshaped 2012Responsive Design Workflow: Webshaped 2012
Responsive Design Workflow: Webshaped 2012
 
Responsive Design Workflow: Mobilism 2012
Responsive Design Workflow: Mobilism 2012Responsive Design Workflow: Mobilism 2012
Responsive Design Workflow: Mobilism 2012
 
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
Responsive Design Workflow (Breaking Development Conference 2012 Orlando)
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The Flow
 
Fronteers Workshop: Rabid Prototyping
Fronteers Workshop: Rabid PrototypingFronteers Workshop: Rabid Prototyping
Fronteers Workshop: Rabid Prototyping
 
Meta layout: a closer look at media queries
Meta layout: a closer look at media queriesMeta layout: a closer look at media queries
Meta layout: a closer look at media queries
 
Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011Real-world Responsive Design @ Breaking Development 2011
Real-world Responsive Design @ Breaking Development 2011
 
HTML5 & Webrichtlijnen 2
HTML5 & Webrichtlijnen 2HTML5 & Webrichtlijnen 2
HTML5 & Webrichtlijnen 2
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

The Back(side) of the Class: A Flexible Guide to Critically Evaluating CSS Methodologies

  • 1. The Back(side) of the Class aka The Inflammatory but Reasonably Politically Correct “It Depends” Talk Stephen Hay, CSS Day 2015
  • 2. Warning: I’m going to make fun of your pet CSS methodology.
  • 3. < d i v c l a s s = " l - h e a d e r " > < d i v c l a s s = " l - c o n s t r a i n e d " > < d i v c l a s s = " l o g o " > < h 2 c l a s s = " h d " > < a h r e f = " / " > < s p a n c l a s s = " h d - l i n e h d - l i n e 1 " < h 3 > A f l e x i b l e g u i d e t o d e v e l o p i n g s i t e s s m a l l a n d l a r g e . < / d i v > < / d i v > < / d i v > view-source:https://smacss.com/
  • 4. < d i v c l a s s = " u n i t s i z e 1 o f 3 " > < d i v c l a s s = " m o d " > < b c l a s s = " t o p " > < b c l a s s = " t l " > < / b > < b c l a s s = " t r " > < / b > < / b > < d i v c l a s s = " i n n e r " > < d i v c l a s s = " h d " > < h 3 > m o d < / h 3 > < / d i v > < d i v c l a s s = " b d " > < p > < / p > < u l c l a s s = " s i m p l e L i s t " > . . . < / u l > < / d i v > < / d i v > < b c l a s s = " b o t t o m " > < b c l a s s = " b l " > < / b > < b c l a s s = " b r " > < / b > < / b > < / d i v > < / d i v > view-source:http://oocss.org/module.html
  • 5. < d i v i d = " m e n u " c l a s s = " n a v b a r _ _ c o l l a p s e c o l l a p s e " > < u l c l a s s = " n a v n a v b a r _ _ n a v " > < l i c l a s s = " n a v _ _ i t e m n a v _ _ i t e m _ a c t i v e " > < a h r e f = " / i n t r o d u c t i o n / " < l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / n a m i n g / " c l a s s = " n a v _ _ l i n k " > N a m i n g < l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / f a q / " c l a s s = " n a v _ _ l i n k " > F A Q < / a > < / l i > < / u l > < / d i v > view-source:http://getbem.com/introduction/
  • 6. < d i v c l a s s = " R o w " > < d i v c l a s s = " F l ( s t a r t ) W ( 1 / 2 ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v > < d i v c l a s s = " F l ( s t a r t ) W ( 1 / 2 ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v > < / d i v > < d i v c l a s s = " D ( t b ) W ( 1 0 0 % ) " r o l e = " p r e s e n t a t i o n " > < d i v c l a s s = " D ( t b c ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v > < d i v c l a s s = " D ( t b c ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v > < / d i v > < d i v c l a s s = " I b B o x W ( 5 0 % ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v > < ! - - - - > < d i v c l a s s = " I b B o x W ( 5 0 % ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v > < d i v c l a s s = " D ( f ) " > < d i v c l a s s = " F l x g ( 1 ) B g c ( # 0 2 8 0 a e ) H ( 9 0 p x ) " > < / d i v > < d i v c l a s s = " F l x g ( 1 ) B g c ( # 0 2 8 0 a e . 5 ) H ( 9 0 p x ) " > < / d i v > < / d i v > http://acss.io/
  • 10. ITCSS
  • 11. BEM
  • 12. ACSS
  • 14. Please don’t be offended It’s good to think critically about the tools and methods we use, and how we use them. This says nothing about their value when applied to specific problems.
  • 15. Why are there so many frameworks and “methodologies”? Because different people are solving different problems.
  • 19. These problems are not necessarily your problems.
  • 20. There is another reason many of us appropriate other people’s solutions to their own problems…
  • 21. We are obsessed with our tools.
  • 22. “Tools don’t solve problems any more, they have become the problem.” — PPK, http://www.quirksmode.org/blog/archives/2015/05/tools_dont_solv.html
  • 23. Some hefty claims are made about these methodologies Faster parsing / Performance CSS is not as “tightly coupled” to the markup More maintainable, less refactoring
  • 24. Performance Steve Souders on “complex” selectors: “For most web sites, the possible performance gains from optimizing CSS selectors will be small, and are not worth the costs.”
  • 25. “It only becomes a factor if you have a large number of DOM elements and complex CSS selectors: If you have 20K DOM elements and 200 complex selectors, it could be bad. If you have 2K DOM elements and 2K complex selectors, it could be bad. But most pages have 900 DOM elements and ~50 complex selectors (based on anecdotal data). Optimizing those 50 complex selectors will not produce a noticeable improvement in performance.”
  • 26. “Tight coupling” < n a v > < u l > < l i > < a h r e f = " / i n t r o d u c t i o n / " > I n t r o d u c t i o n < / a > < / l i > < l i > < a h r e f = " / n a m i n g / " > N a m i n g < / a > < / l i > < l i > < a h r e f = " / f a q / " > F A Q < / a > < / l i > < / u l > < / n a v > n a v l i { . . . }
  • 27. Not coupled? < u l c l a s s = " n a v n a v b a r _ _ n a v " > < l i c l a s s = " n a v _ _ i t e m n a v _ _ i t e m _ a c t i v e " > < a h r e f = " / i n t r o d u c t i o n / " c l a s s = < l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / n a m i n g / " c l a s s = " n a v _ _ l i n k " > N a m i n g < l i c l a s s = " n a v _ _ i t e m " > < a h r e f = " / f a q / " c l a s s = " n a v _ _ l i n k " > F A Q < / a > < / l i > < / u l > . n a v _ _ i t e m { . . . }
  • 28. Less refactoring? It’s true. But HTML is now your closet.
  • 29. Now you can do all that refactoring in your HTML. (But at least it’s not in your CSS!)
  • 31. We’re trying to approach CSS as if it were a programming language.
  • 32. 50 Lies Programmers Believe, no. 20 CSS can be “object-oriented” or “functional” rather than a declarative rules language with a moderately complex inheritance model. — Tom Morris, https://tommorris.org/posts/9317
  • 34. Most of the problems class-based methods solve are problems that we caused in the first place.
  • 36.
  • 37. < d i v c l a s s = " c o n t a c t p e r s o o n t e a s e r " > . . . < / d i v > . c o n t a c t p e r s o o n { . . . } . c o n t a c t p e r s o o n . t e a s e r { . . . } . c o n t a c t p e r s o o n . o v e r v i e w { . . . }
  • 39. “However, when it comes to larger, more complex projects, how you organize your code is a key to efficiency. Not only in how much time it takes, but also in how much code you write, and how much a browser has to load. This is especially important when you’re working with a team of themers, and when performance is important.” — http://getbem.com/introduction/
  • 40. class-based “methodologies” will not solve your organisational problems.
  • 41. We’re teaching people that these methods are the “correct” way to approach writing CSS.
  • 42. Stackoverflow CSS question about Bootstrap
  • 43. We “need” an increasing number of tools, frameworks, methods and dependencies to do our jobs.
  • 44. I want to write some CSS CSS Sass/LESS/Flavor-of-the-month Susy Autoprefixer Minify Grunt Node.js/npm ?
  • 45. We want a magical methodology that works for every project.
  • 46. Large-scale, complex Enterprise From the companies that brought you waterfall processes and ridiculously complex charts and graphs.
  • 47. All of us are right, respectively.
  • 48. My name is Stephen, and I added these to a project to meet a client’s needs. . w h o l e . h a l f . t h i r d s . f i r s t . l a s t . h i g h l i g h t
  • 49. These problems we’re having are real problems, and tools and methodologies do help solve some of them. It’s our job to think critically about which problems we’re trying to solve, and which tools and methods are necessary to that specific purpose. In other words, there are no best practices.
  • 51. Inheritance is powerful. Are you sure you don’t want it?
  • 52. Embrace the chaos. The Web is messy. Projects are messy. Development is messy. And that’s okay. What’s right for this project?
  • 53. Start simply What if we started our projects with nothing but plain CSS, and only added tools and methodologies when absolutely necessary and not as a default?
  • 54. Respect the content, seek independence
  • 55.
  • 56. . n a v { . . . } . n a v b a r _ _ n a v { . . . } < u l c l a s s = " n a v n a v b a r _ _ n a v " > < / u l >
  • 59. Refactoring is a good thing None of us write perfect code the very first time.
  • 60. “Refactoring isn’t rework. It is revision, but it isn’t doing the work over.” — Ron Jeffries, http://www.ronjeffries.com/xprog/classics/refactoringisntrework/
  • 61. Documentation Namespaces are not enough. Code comments are not enough. If you want people to understand the logic behind your approach to a given project’s CSS, you need to write documentation for people.
  • 62.
  • 64. Stop teaching people that this is how you write CSS There is no particular “right” way to write CSS. HTML and CSS are often difficult enough without all the layers of abstraction and complexity that we add with our pet frameworks.
  • 65. Keep things simple. Respect the content. Think critically.