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
83
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
72
Adapter Pattern
juanzuluaga
0
170
Elixir 101 - The Erlang VM
juanzuluaga
5
330
UI Fundamentals for Programmers
juanzuluaga
0
240
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
AI時代の認知負荷との向き合い方
optfit
0
150
AI巻き込み型コードレビューのススメ
nealle
1
150
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
680
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.8k
ぼくの開発環境2026
yuzneri
0
190
CSC307 Lecture 04
javiergs
PRO
0
660
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
560
ThorVG Viewer In VS Code
nors
0
770
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
75
Side Projects
sachag
455
43k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
92
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Testing 201, or: Great Expectations
jmmastey
46
8k
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?