SlideShare ist ein Scribd-Unternehmen logo
1 von 66
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 
Universal Design
Universal DesignUniversal Design
Universal Designflotld
 
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
 

Ähnlich wie 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
 
Universal Design
Universal DesignUniversal Design
Universal Design
 
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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Kürzlich hochgeladen (20)

Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

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.