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
CSC307 Lecture 04
javiergs
PRO
0
660
Fragmented Architectures
denyspoltorak
0
150
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
110
ぼくの開発環境2026
yuzneri
0
210
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
510
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
280
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
53
The SEO identity crisis: Don't let AI make you average
varn
0
240
A Modern Web Designer's Workflow
chriscoyier
698
190k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
For a Future-Friendly Web
brad_frost
182
10k
The agentic SEO stack - context over prompts
schlessera
0
630
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Everyday Curiosity
cassininazir
0
130
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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