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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Maintainable CSS
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
82
Adapter Pattern
juanzuluaga
0
180
Elixir 101 - The Erlang VM
juanzuluaga
5
340
UI Fundamentals for Programmers
juanzuluaga
0
300
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
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
100
XHTMLが残したもの
yosuke_furukawa
PRO
2
460
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
120
typoなんかねぇよ
raspython3
0
670
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
640
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
130
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
480
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
760
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
180
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building an army of robots
kneath
306
46k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Unsuck your backbone
ammeep
672
58k
Ethics towards AI in product and experience design
skipperchong
2
360
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.8k
Leo the Paperboy
mayatellez
8
2.2k
Producing Creativity
orderedlist
PRO
348
41k
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?