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
69
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
150
Other Decks in Programming
See All in Programming
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
220
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
140
リアルな遅延を測る仕様
kota_yata
1
120
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
200
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
570
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.5k
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
250
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
240
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
400
Oxlintはいいぞ(続)
yug1224
1
410
Flow は今どうなっているか
mizdra
PRO
0
690
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
370
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1.1k
Embracing the Ebb and Flow
colly
88
5.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Mind Mapping
helmedeiros
PRO
1
330
My Coaching Mixtape
mlcsv
0
270
Discover your Explorer Soul
emna__ayadi
2
1.3k
Utilizing Notion as your number one productivity tool
mfonobong
4
550
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
180
Measuring & Analyzing Core Web Vitals
bluesmoon
9
970
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Designing for Timeless Needs
cassininazir
1
450
WENDY [Excerpt]
tessaabrams
11
39k
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