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
86
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
79
Adapter Pattern
juanzuluaga
0
170
Elixir 101 - The Erlang VM
juanzuluaga
5
340
UI Fundamentals for Programmers
juanzuluaga
0
280
UI fundamentals for programmers
juanzuluaga
0
400
Programming in paradise
juanzuluaga
1
140
Intro to Ruby
juanzuluaga
1
700
Other Decks in Programming
See All in Programming
OSもどきOS
arkw
0
560
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
6.1k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
770
net-httpのHTTP/2対応について
naruse
0
480
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
170
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
400
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
230
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.3k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
610
GitHub's CSS Performance
jonrohan
1033
470k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
350
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
The browser strikes back
jonoalderson
0
1.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How to make the Groovebox
asonas
2
2.2k
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?