Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Maintainable CSS
Search
Juanda Zapata
March 30, 2016
Programming
0
74
Maintainable CSS
Introduction to BEM
Juanda Zapata
March 30, 2016
Tweet
Share
More Decks by Juanda Zapata
See All by Juanda Zapata
Principles of Visual Design
juanzuluaga
0
61
Adapter Pattern
juanzuluaga
0
150
Elixir 101 - The Erlang VM
juanzuluaga
5
310
UI Fundamentals for Programmers
juanzuluaga
0
170
UI fundamentals for programmers
juanzuluaga
0
340
Programming in paradise
juanzuluaga
1
130
Intro to Ruby
juanzuluaga
1
690
Other Decks in Programming
See All in Programming
Going beyond Apache Parquet's default settings
xhochy
0
150
Escolhendo (ou não) o melhor ORM para o seu projeto
andreiacsilva
1
160
Let's learn code review
riofujimon
2
640
Amazon Aurora Serverless v2が意外と高かった話と、AWS Database Migration Serviceの話
satoshi256kbyte
1
110
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
190
SIMD Parallel Programming with the Vector API
josepaumard
0
250
ペパボOpenTelemetry革命
pyama86
2
670
WebGLで始める コンピュータグラフィックス入門
heller77
0
370
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
620
仕様と実装で学ぶOpenTelemetry
drumato
2
640
TypeScriptのパフォーマンス改善
yajihum
13
5k
2024 コーディング研修
ckazu
2
630
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
Code Review Best Practice
trishagee
56
15k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
123
39k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
23
1.7k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
What's new in Ruby 2.0
geeforr
338
31k
Become a Pro
speakerdeck
PRO
13
4.6k
Making the Leap to Tech Lead
cromwellryan
125
8.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
22
6.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Transcript
Maintainable CSS with BEM
a set of conventions
not a library
not a framework
set of conventions
enforce them in code review
not a silver bullet
writing maintainable CSS is HARD
add everything to app.sass
app.sass => 1000 LOC
too hard to find a selector
too easy to overwrite a style
not maintainable
BEM
Block Element Modifier
None
None
None
None
None
None
not easily overwritten by accident
None
ugh that's a lot of typing
None
folder structure
again, not enforced by any script or framework
better to have several small focused files
None
None
use the power of SASS
variables
we can change the whole L&F of an app just
by modifying one file
None
alternatives
SMACSS https://smacss.com/
Scalable Modular Architecture for CSS
Used by TWTBS
Selectors tend to be deeply nested
Hard to customize
It's ok to mix BEM and SMACSS
CSSModules http://glenmaddern.com/articles/css-modules
Gaining a lot of steam in the REACT community
It's a step forward over BEM without global namespaces
thanks!
questions?