Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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で作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
170
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
130
FreeBSDでZabbixを動かす.pdf
kenkino
0
140
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
270
業務時間外もAIに働いてもらう話
colorful12
3
10k
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
450
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
180
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
Jetpack Compose メカニズム
skydoves
0
360
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
120
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
120
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
A Modern Web Designer's Workflow
chriscoyier
699
190k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
520
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
460
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
280
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
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