Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
BEM for Real Programmers
Search
Mattijs Bliek
July 15, 2016
Programming
0
44
BEM for Real Programmers
Internal talk at Mollie
Mattijs Bliek
July 15, 2016
Tweet
Share
More Decks by Mattijs Bliek
See All by Mattijs Bliek
Vim for newbies
mattijsbliek
0
65
A Front-end Designer's Guide to the Galaxy
mattijsbliek
0
130
Digital Design for Humans
mattijsbliek
1
150
Designing in the Future
mattijsbliek
1
140
How to automate (nearly) anything
mattijsbliek
0
140
Other Decks in Programming
See All in Programming
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
350
20 years of Symfony, what's next?
fabpot
2
370
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
520
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
210
JETLS.jl ─ A New Language Server for Julia
abap34
1
420
マスタデータ問題、マイクロサービスでどう解くか
kts
0
110
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
170
FluorTracer / RayTracingCamp11
kugimasa
0
240
大体よく分かるscala.collection.immutable.HashMap ~ Compressed Hash-Array Mapped Prefix-tree (CHAMP) ~
matsu_chara
2
220
Github Copilotのチャット履歴ビューワーを作りました~WPF、dotnet10もあるよ~ #clrh111
katsuyuzu
0
110
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
360
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Optimizing for Happiness
mojombo
379
70k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Automating Front-end Workflow
addyosmani
1371
200k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing for humans not robots
tammielis
254
26k
Making Projects Easy
brettharned
120
6.5k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Language of Interfaces
destraynor
162
25k
Transcript
None
• Oorsprong • Basics • Wat fixt het? BEMBEMBEM
• Koppeling met html • Conflicten in selectors • Onbedoelde
cascades CSS The Bad Parts
• OOCSS (Nicole Sullivan) • Yandex • Nicolas Gallager Russia
to the rescue
None
• Block • Element • Modifier Basics
.cup (block) .cup--glass (modifier) .beer (block)
None
Maar wat fixt het nou?
Vijf problemen uitgelegd voor Real Programmers™
"Ik moet !important gebruiken om dit te overschrijven"
1. Cyclomatic complexity
A quantitative measure of the number of linearly independent paths
through a program's source code.
None
None
Te generiek
None
"Ik heb geen idee waarom deze style wordt toegepast."
2. Composition over inheritance
Ook in CSS kun je beter selectors composen dan laten
overerven
None
None
None
None
"Ik durf dit niet aan te passen want misschien gaan
het ergens anders stuk."
3. Open/Closed principle
Open for extension, closed for modification
Als je veelgebruikte styles aanpast gaat er bijna zeker weten
ergens wat kaduuk
Gateway to hell
None
Op deze manier zijn de nieuwe styles opt-in en weet
je zeker dat er niks breekt
"Deze selector wordt op twintig plekken gebruikt. Waar moet ik
zoeken?"
4. Single source of truth
Welke styles gelden nu voor .cookie? En als ik hier
.cookie aan wil passen, waar moet ik dan zijn?
Hier weet ik exact welke styles applied worden, en waar
ik ze kan vinden
Styles voor .card zitten altijd in card.css Conventie: module ==
file
"Deze selector wordt in wel 20 files gebruikt."
5. Single responsibility principle
Deze button doet een heleboel en kan niet hergebruikt worden.
Nu is de button herbruikbaar en doet elke selector maar
één ding
Tijd voor ACTIE
None
None
None
None
None
None
None
None
None