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 // Get Started // SASS Guidelines
Search
Julia Rechkunova
September 10, 2016
Programming
1
52
BEM // Get Started // SASS Guidelines
Intro to BEM. SASS Guidelines.
Julia Rechkunova
September 10, 2016
Tweet
Share
Other Decks in Programming
See All in Programming
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
960
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
「ブロックテーマでは再現できない」は本当か?
inc2734
0
990
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
210
SourceGeneratorのススメ
htkym
0
200
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
310
Designing Powerful Visuals for Engaging Learning
tmiket
0
230
sira's awesome portfolio website redesign presentation
elsirapls
0
150
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
91
Building AI with AI
inesmontani
PRO
1
690
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
The Curse of the Amulet
leimatthew05
1
8.5k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Navigating Weather and Climate Data
rabernat
0
100
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Transcript
BEM Get Started SASS Guidelines @jughosta
BEM • Block • Element • Modifier More info https://en.bem.info/methodology/
BEM // Block <section class="search"> ... </section>
BEM // Element <section class="search"> <div class="search__content"> ... </div> ...
</section>
BEM // Element <section class="search"> <div class="search__content"> ... </div> <input
type="text" class="search__input"> </section>
BEM // Element <section class="search"> <div class="search__content"> <input type="text" class="?">
</div> ... </section>
BEM // Element <section class="search"> <div class="search__content"> <input type="text" class="search__input">
</div> ... </section>
BEM // Block inside Element <section class="search"> <div class="search__content"> <input
type="text" class="search__input"> <button class="button">Search</button> </div> ... </section>
BEM // Element for additional styles (margins, ...) <section class="search">
<div class="search__content"> <input type="text" class="search__input"> <button class="button" style="margin-left: 30px">Search</button> </div> ... </section>
BEM // Element for additional styles (margins, ...) <section class="search">
<div class="search__content"> <input type="text" class="search__input"> <div class="search__button"> <button class="button">Search</button> </div> </div> </section>
BEM // Modifier <section class="search"> <div class="search__content"> <input type="text" class="search__input">
<div class="search__button"> <button class="button button--small">Search</button> </div> </div> </section>
BEM // Modifier name + value <section class="search"> <div class="search__content">
<input type="text" class="search__input"> <div class="search__button"> <button class="button button--size-small">Search</button> </div> </div> </section>
BEM with CSS Block .block { … } Element .block__element
{ … } Modifier .block--modifier { … } .block__element--modifier { … }
BEM with SASS .block { &--modifier { … } }
.block__element { … } // searchable
BEM with SASS .block { &--modifier { … } }
.block__element { … } @include media($mq) { … // same structure here }
BEM with SASS .block { ... &:hover { … }
&:before { … } &--modifier { … } } .block__element { … } .block__long-element-name-here { … }
SASS Code Style • Always use .class selectors • No
#id as a selector • No tag as a selector • Max 2 levels for nesting • .util-text-overflow-break • .layout-page • 0, not 0px • #ccc, not #cccccc or #CCC • … More info https://sass-guidelin.es/
CSS properties order .selector { /* Positioning */ /* Display
& Box Model */ /* Color */ /* Text */ /* Other */ } More info https://css-tricks.com/poll-results-how-do-you-order-your-css-properties/
Thanks Q&A