Submit Search
Upload
CSS naming | ceci n'est pas un pipe
•
3 likes
•
642 views
Wilfred Nas
Follow
Slides of a lighting talk I gave for the 2014 fronteers conference on css naming
Read less
Read more
Internet
Report
Share
Report
Share
1 of 61
Download now
Download to read offline
Recommended
How zoho and free agent connector (ztfa) works
How zoho and free agent connector (ztfa) works
ethonindia
logincode carasen12
logincode carasen12
carlos asensio
Don't scrape, Glean!
Don't scrape, Glean!
tommorris
Cascading Style Speelgoed
Cascading Style Speelgoed
Stijn Vogels
Web components presentation at samsung
Web components presentation at samsung
Seo-Young Hwang
1shopping cart to zoho integration
1shopping cart to zoho integration
ethonindia
BEM을 깨우치다.
BEM을 깨우치다.
우영 주
Visualforce css developer guide(by forcetree.com)
Visualforce css developer guide(by forcetree.com)
Edwin Vijay R
Recommended
How zoho and free agent connector (ztfa) works
How zoho and free agent connector (ztfa) works
ethonindia
logincode carasen12
logincode carasen12
carlos asensio
Don't scrape, Glean!
Don't scrape, Glean!
tommorris
Cascading Style Speelgoed
Cascading Style Speelgoed
Stijn Vogels
Web components presentation at samsung
Web components presentation at samsung
Seo-Young Hwang
1shopping cart to zoho integration
1shopping cart to zoho integration
ethonindia
BEM을 깨우치다.
BEM을 깨우치다.
우영 주
Visualforce css developer guide(by forcetree.com)
Visualforce css developer guide(by forcetree.com)
Edwin Vijay R
Introduction to web programming with JavaScript
Introduction to web programming with JavaScript
T11 Sessions
Juggling
Juggling
Casey Bradford
Best practices in museum search
Best practices in museum search
Nate Solas
Haml And Sass In 15 Minutes
Haml And Sass In 15 Minutes
Patrick Crowley
Sinatra
Sinatra
Nicolás Sanguinetti
MCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUAL
DIVYA SINGH
Beautiful Java EE - PrettyFaces
Beautiful Java EE - PrettyFaces
Lincoln III
Playing With The Web
Playing With The Web
Christian Heilmann
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
Igalia
CSS 3 Overview
CSS 3 Overview
Owen Williams
Lecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITP
yucefmerhi
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
Html structure
Html structure
akkias
Finding things on the web with BOSS
Finding things on the web with BOSS
Christian Heilmann
Scalable CSS Architecture
Scalable CSS Architecture
Michał Pierzchała
cascading style sheet ppt
cascading style sheet ppt
abhilashagupta
Lecture1 B Frames&Forms
Lecture1 B Frames&Forms
Sur College of Applied Sciences
Fixture Replacement Plugins
Fixture Replacement Plugins
Paul Klipp
More of less (take 2)
More of less (take 2)
Guilherme Zühlke O'Connor
Html file
Html file
Pawan Mishra
Progressive enhancement-fronteers-workshop
Progressive enhancement-fronteers-workshop
Wilfred Nas
What has responsive web design done for us, so far.
What has responsive web design done for us, so far.
Wilfred Nas
More Related Content
Similar to CSS naming | ceci n'est pas un pipe
Introduction to web programming with JavaScript
Introduction to web programming with JavaScript
T11 Sessions
Juggling
Juggling
Casey Bradford
Best practices in museum search
Best practices in museum search
Nate Solas
Haml And Sass In 15 Minutes
Haml And Sass In 15 Minutes
Patrick Crowley
Sinatra
Sinatra
Nicolás Sanguinetti
MCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUAL
DIVYA SINGH
Beautiful Java EE - PrettyFaces
Beautiful Java EE - PrettyFaces
Lincoln III
Playing With The Web
Playing With The Web
Christian Heilmann
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
Igalia
CSS 3 Overview
CSS 3 Overview
Owen Williams
Lecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITP
yucefmerhi
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Todd Zaki Warfel
Html structure
Html structure
akkias
Finding things on the web with BOSS
Finding things on the web with BOSS
Christian Heilmann
Scalable CSS Architecture
Scalable CSS Architecture
Michał Pierzchała
cascading style sheet ppt
cascading style sheet ppt
abhilashagupta
Lecture1 B Frames&Forms
Lecture1 B Frames&Forms
Sur College of Applied Sciences
Fixture Replacement Plugins
Fixture Replacement Plugins
Paul Klipp
More of less (take 2)
More of less (take 2)
Guilherme Zühlke O'Connor
Html file
Html file
Pawan Mishra
Similar to CSS naming | ceci n'est pas un pipe
(20)
Introduction to web programming with JavaScript
Introduction to web programming with JavaScript
Juggling
Juggling
Best practices in museum search
Best practices in museum search
Haml And Sass In 15 Minutes
Haml And Sass In 15 Minutes
Sinatra
Sinatra
MCSL016 IGNOU SOLVED LAB MANUAL
MCSL016 IGNOU SOLVED LAB MANUAL
Beautiful Java EE - PrettyFaces
Beautiful Java EE - PrettyFaces
Playing With The Web
Playing With The Web
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
CSS 3 Overview
CSS 3 Overview
Lecture 2 - Comm Lab: Web @ ITP
Lecture 2 - Comm Lab: Web @ ITP
Prototyping w/HTML5 and CSS3
Prototyping w/HTML5 and CSS3
Html structure
Html structure
Finding things on the web with BOSS
Finding things on the web with BOSS
Scalable CSS Architecture
Scalable CSS Architecture
cascading style sheet ppt
cascading style sheet ppt
Lecture1 B Frames&Forms
Lecture1 B Frames&Forms
Fixture Replacement Plugins
Fixture Replacement Plugins
More of less (take 2)
More of less (take 2)
Html file
Html file
More from Wilfred Nas
Progressive enhancement-fronteers-workshop
Progressive enhancement-fronteers-workshop
Wilfred Nas
What has responsive web design done for us, so far.
What has responsive web design done for us, so far.
Wilfred Nas
Javascript is evil - fronteers 2013 jam sessions
Javascript is evil - fronteers 2013 jam sessions
Wilfred Nas
Html5 intro
Html5 intro
Wilfred Nas
Bestpractices nl
Bestpractices nl
Wilfred Nas
Html5 nl
Html5 nl
Wilfred Nas
Fronteers iprofs
Fronteers iprofs
Wilfred Nas
front end workshop v3
front end workshop v3
Wilfred Nas
front end workshop v2
front end workshop v2
Wilfred Nas
Frontend Workshop
Frontend Workshop
Wilfred Nas
More from Wilfred Nas
(10)
Progressive enhancement-fronteers-workshop
Progressive enhancement-fronteers-workshop
What has responsive web design done for us, so far.
What has responsive web design done for us, so far.
Javascript is evil - fronteers 2013 jam sessions
Javascript is evil - fronteers 2013 jam sessions
Html5 intro
Html5 intro
Bestpractices nl
Bestpractices nl
Html5 nl
Html5 nl
Fronteers iprofs
Fronteers iprofs
front end workshop v3
front end workshop v3
front end workshop v2
front end workshop v2
Frontend Workshop
Frontend Workshop
Recently uploaded
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
Matthew Sinclair
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
growthgrids
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Digicorns Technologies
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
meghakumariji156
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
Monica Sydney
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
rahman018755
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
Matthew Sinclair
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
kajalverma014
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Priya Reddy
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
meghakumariji156
Recently uploaded
(20)
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
CSS naming | ceci n'est pas un pipe
1.
Ceci n'est pas
une pipe @wnas
2.
About css naming
conventions.
3.
What are they.
4.
.g-form-checkbox { //
always }
5.
G is for
the generic stuff .g-form-checkbox { // use }
6.
FORM is for
the form stuff .g-form-checkbox { // a }
7.
CHECKBOX is for
the … .g-form-checkbox { // carrousel }
8.
Why should you
use them
9.
.textAlignRight { text-align:
left; }
10.
We are wiser
than that, right?
11.
.button { //
be }
12.
.btn { //
excellent }
13.
.normalButton { //
to }
14.
.button button {
// each }
15.
.button { //
be } .btn { // excellent } .normalButton { // to } .button button { // each } button { // other }
16.
To make you
think
17.
To help you
communicate
18.
Don’t build pages
19.
Build components
20.
And elements
21.
To get you
started
22.
BEM https://bem.info/method/
23.
OOCSS http://oocss.org/
24.
SMACSS https://smacss.com/
25.
My choice?
26.
Build your own
27.
Pattern lab http://patternlab.io/
28.
Atoms, molecules and
organisms
29.
Examples
30.
Atoms
31.
<input>
32.
.g-form-input { //
Never border: 1px solid pink; }
33.
Types
34.
.g-form-input { //
gonna border: 1px solid pink; } .g-form-input[type=search] { // give border-color: orange; } .g-form-input[type=number] { // you border-style: dotted; }
35.
State
36.
.g-form-input { //
up border: 1px solid pink; } .g-form-input:focus { // Never outline: 0; } .g-form-input[type=search]:focus { // gonna border-width: 2px; outline: 2px dotted blue; }
37.
You could also
do…
38.
.g-form-input { //
say border: 1px solid pink; } .g-form-input.search { // good bey border-style: dotted; } .g-form-input.search.disabled { // Never border-color: lightgray; }
39.
.g-form-input { //
gonna border: 1px solid pink; } .g-form-input-search { // turn border-image-outset: sides; } .g-form-input-search—disabled { // around border-left:0; }
40.
Be lazy!
41.
Molecules
42.
How they play
together
43.
.g-m-search { //
and }}
44.
.g-m-search { //
desert } .g-m-search .g-form-input { // you border-bottom: 5px; }
45.
Organisms
46.
.g-o-header { //
now for something, } .g-o-header .g-form-input:focus { // completely different border-bottom-color: blue; }
47.
.g-o-header .g-m-search {
// the } .g-o-header .g-m-search .g-form-input:focus { // Larch border-top-color: khaki; }
48.
Templates
49.
.g-t-search .g-form-input {
// red pill border-color: red; }
50.
.g-t-result .g-form-input {
// blue pill border-color: aqua; }
51.
Pages
52.
.g-t-result.g-page-jammSession .g-form-input {
// almost done Krijn… border: 0; }
53.
A few more
pointers
54.
Avoid using ID’s
55.
Don’t over nest
56.
Avoid direct child
selectors >
57.
Also avoid the
Adjacent sibling combinator (+) and the General sibling combinator (~)
58.
More than one
class on an element ain’t all bad.
59.
<div class=“g-form-button g-form-button-inactive
g-form-button-primary”> <button>Click me</button> </div>
60.
Talk about it!
61.
@wnas
Download now