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
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
Package Management Learnings from Homebrew
mikemcquaid
0
170
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
870
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.4k
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
600
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Apache Iceberg V3 and migration to V3
tomtanaka
0
130
AtCoder Conference 2025
shindannin
0
1k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
6.3k
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Utilizing Notion as your number one productivity tool
mfonobong
2
210
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
50
Mobile First: as difficult as doing things right
swwweet
225
10k
GraphQLとの向き合い方2022年版
quramy
50
14k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Writing Fast Ruby
sferik
630
62k
Exploring anti-patterns in Rails
aemeredith
2
240
The agentic SEO stack - context over prompts
schlessera
0
610
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
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/