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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.2k
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
230
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
370
dchart: charts from deck markup
ajstarks
3
990
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
0
150
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
AI時代の認知負荷との向き合い方
optfit
0
130
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
110
Fluid Templating in TYPO3 14
s2b
0
120
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
190
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
Grafana:建立系統全知視角的捷徑
blueswen
0
320
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
Code Reviewing Like a Champion
maltzj
527
40k
Navigating Weather and Climate Data
rabernat
0
89
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
94
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
50
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Scaling GitHub
holman
464
140k
How to build a perfect <img>
jonoalderson
1
4.9k
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