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
87
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Maintainable CSS
Introduction to BEM
Juanda Zapata
March 30, 2016
More Decks by Juanda Zapata
See All by Juanda Zapata
Principles of Visual Design
juanzuluaga
0
79
Adapter Pattern
juanzuluaga
0
180
Elixir 101 - The Erlang VM
juanzuluaga
5
340
UI Fundamentals for Programmers
juanzuluaga
0
280
UI fundamentals for programmers
juanzuluaga
0
400
Programming in paradise
juanzuluaga
1
150
Intro to Ruby
juanzuluaga
1
700
Other Decks in Programming
See All in Programming
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
140
1B+ /day規模のログを管理する技術
broadleaf
0
130
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
7
2.9k
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
2.5k
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
210
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
Vite+ Unified Toolchain for the Web
naokihaba
0
700
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
350
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
1
120
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
4.7k
自作OSでスライド発表する
uyuki234
1
3.7k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
For a Future-Friendly Web
brad_frost
183
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
190
Into the Great Unknown - MozCon
thekraken
41
2.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
First, design no harm
axbom
PRO
2
1.2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
670
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
170
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?