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
80
Adapter Pattern
juanzuluaga
0
180
Elixir 101 - The Erlang VM
juanzuluaga
5
340
UI Fundamentals for Programmers
juanzuluaga
0
290
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
その節約、円になってますか?
isamumumu
1
640
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
1.1k
yield再入門 #phpcon
o0h
PRO
0
860
メールのエイリアス機能を履き違えない
isshinfunada
0
190
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
510
AIエージェントで 変わるAndroid開発環境
takahirom
2
760
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.7k
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
190
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.3k
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.4k
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
180
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
1k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The Cult of Friendly URLs
andyhume
79
7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
430
We Have a Design System, Now What?
morganepeng
55
8.2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
270
What's in a price? How to price your products and services
michaelherold
247
13k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
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?