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
82
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
200
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
Design Foundational Data Engineering Observability
sucitw
3
180
コンテキストエンジニアリング Cursor編
kinopeee
1
760
Testing Trophyは叫ばない
toms74209200
0
770
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.4k
速いWebフレームワークを作る
yusukebe
5
1.7k
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
1.1k
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
500
AIエージェント開発、DevOps and LLMOps
ymd65536
1
380
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.1k
TDD 実践ミニトーク
contour_gara
1
290
オープンセミナー2025@広島LT技術ブログを続けるには
satoshi256kbyte
0
180
TanStack DB ~状態管理の新しい考え方~
bmthd
2
490
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Typedesign – Prime Four
hannesfritz
42
2.8k
Producing Creativity
orderedlist
PRO
347
40k
Music & Morning Musume
bryan
46
6.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Done Done
chrislema
185
16k
Become a Pro
speakerdeck
PRO
29
5.5k
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?