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
Mattijs Bliek
July 15, 2016
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BEM for Real Programmers
Internal talk at Mollie
Mattijs Bliek
July 15, 2016
More Decks by Mattijs Bliek
See All by Mattijs Bliek
Vim for newbies
mattijsbliek
0
74
A Front-end Designer's Guide to the Galaxy
mattijsbliek
0
140
Digital Design for Humans
mattijsbliek
1
160
Designing in the Future
mattijsbliek
1
150
How to automate (nearly) anything
mattijsbliek
0
160
Other Decks in Programming
See All in Programming
AIの中の人になってみる
htkym
0
170
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
150
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
640
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
210
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
2
810
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
160
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
270
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Agile that works and the tools we love
rasmusluckow
331
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
30 Presentation Tips
portentint
PRO
1
390
sira's awesome portfolio website redesign presentation
elsirapls
0
410
The browser strikes back
jonoalderson
0
1.6k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
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