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
84
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
74
Adapter Pattern
juanzuluaga
0
170
Elixir 101 - The Erlang VM
juanzuluaga
5
330
UI Fundamentals for Programmers
juanzuluaga
0
260
UI fundamentals for programmers
juanzuluaga
0
390
Programming in paradise
juanzuluaga
1
140
Intro to Ruby
juanzuluaga
1
700
Other Decks in Programming
See All in Programming
PHPで TLSのプロトコルを実装してみる
higaki_program
0
580
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
4
2.2k
Nuxt Server Components
wattanx
0
210
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
150
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
7
3.5k
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
120
The free-lunch guide to idea circularity
hollycummins
0
390
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
450
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
420
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
320
Featured
See All Featured
BBQ
matthewcrist
89
10k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
440
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
260
Git: the NoSQL Database
bkeepers
PRO
432
67k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Building AI with AI
inesmontani
PRO
1
830
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
110
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
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?