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
BEM for Real Programmers
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Mattijs Bliek
July 15, 2016
Programming
0
46
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
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
1.2k
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
380
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
400
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
710
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
140
CSC307 Lecture 12
javiergs
PRO
0
460
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
750
AI活用のコスパを最大化する方法
ochtum
0
120
Event Storming
hschwentner
3
1.3k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
310
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
320
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
210
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
280
Technical Leadership for Architectural Decision Making
baasie
3
280
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
960
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
280
Odyssey Design
rkendrick25
PRO
2
540
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
69
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Design in an AI World
tapps
0
160
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