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 Methodology
Search
Jacek Spławski
January 17, 2016
Programming
0
1.2k
BEM Methodology
The basics, main principles, use BEM with Sass, use BEM with JS, pros and cons of BEM methodology
Jacek Spławski
January 17, 2016
Tweet
Share
More Decks by Jacek Spławski
See All by Jacek Spławski
Become a Git Superhero
zacol
0
150
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
0
1k
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.4k
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
470
Python札幌 LT資料
t3tra
7
1.1k
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
37k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
CSC307 Lecture 02
javiergs
PRO
1
740
Vibe codingでおすすめの言語と開発手法
uyuki234
0
160
CSC307 Lecture 03
javiergs
PRO
1
460
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
500
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
640
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
150
Featured
See All Featured
From π to Pie charts
rasagy
0
100
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
870
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
97
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Thoughts on Productivity
jonyablonski
73
5k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
160
Documentation Writing (for coders)
carmenintech
77
5.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
エンジニアに許された特別な時間の終わり
watany
106
220k
The SEO identity crisis: Don't let AI make you average
varn
0
44
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
990
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
35
Transcript
BEM Methodology Jacek Spławski Poznań, January 2016
We are not designing pages, we are designing systems of
components. — Stephen Hay
Modularity is requirement of maintainable systems. — Ben Callahan
OOCSS / SMACSS / BEM / Atomic / SUITCSS
BEM is a naming convention for classes in HTML and
CSS.
Created by Yandex — one of the leading internet companies
in Russia.
Block Element Modifier
Block is standalone entity that is meaningful on its own.
Blocks can be nested and interact with each other, semantically
they remain equal; there is no precedence or hierarchy.
Block names may consist of lowercase Latin letters, digits, and
dashes. Individual words within names are separated by a dash. .block
Block name should identify block and say what it is
responsible for. The block name replaces IDs.
Element is parts of a block and have no standalone
meaning. They are semantically tied to its block.
Element names may consist of Latin letters, digits, dashes and
underscores. CSS class is formed as block name plus two underscores plus element name. .block__element
Modifier are flags on blocks or elements. Use them to
change appearance or behavior.
Modifier names may consist of Latin letters, digits, dashes and
underscores. CSS class is formed as block’s or element’s name plus two dashes. .block__element——modifier
DOM Tree → BEM Tree
Sass — BEM .block { &——modifier {} &__element {} }
= .block {} .block——modifier {} .block__element {}
BEM ? JS
jQuery BEM Helpers jQuery BEM Plugin i-BEM framework by Yandex
no dependencies on other elements reduce cascading problems reduce amount
of CSS code create ready blocks library simple and understandable structure in CSS and HTML code Sass loves BEM drop tag names and IDs
long class names which could look’s weird develop the habit
to properly name class modular thinking
https://css-tricks.com/bem-101/ http://getbem.com/ https://en.bem.info/ https://www.smashingmagazine.com/ 2012/04/a-new-front-end-methodology- bem/