Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Maintainable CSS
Search
Juanda Zapata
March 30, 2016
Programming
89
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
85
Adapter Pattern
juanzuluaga
0
180
Elixir 101 - The Erlang VM
juanzuluaga
5
340
UI Fundamentals for Programmers
juanzuluaga
0
330
UI fundamentals for programmers
juanzuluaga
0
410
Programming in paradise
juanzuluaga
1
150
Intro to Ruby
juanzuluaga
1
700
Other Decks in Programming
See All in Programming
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
300
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
220
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
590
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
210
Next.js: The final boss of Web Performance
guaca
0
400
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
100
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
330
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
420
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Designing Experiences People Love
moore
143
24k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Code Reviewing Like a Champion
maltzj
529
40k
Building the Perfect Custom Keyboard
takai
2
950
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
The untapped power of vector embeddings
frankvandijk
2
2k
A designer walks into a library…
pauljervisheath
211
25k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
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?