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
CSS
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
James Shedden
June 24, 2015
Technology
1
90
CSS
How I make cool & maintainable stuff, fast.
James Shedden
June 24, 2015
Tweet
Share
More Decks by James Shedden
See All by James Shedden
Flexbox is cool and fun
jamesshedden
1
140
Other Decks in Technology
See All in Technology
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.1k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
5
760
月間数億レコードのアクセスログ基盤を無停止・低コストでAWS移行せよ!アプリケーションエンジニアのSREチャレンジ💪
miyamu
0
800
GCASアップデート(202510-202601)
techniczna
0
250
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
350
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
120
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
120
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
270
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
3
520
Featured
See All Featured
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
KATA
mclloyd
PRO
34
15k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Utilizing Notion as your number one productivity tool
mfonobong
2
210
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
50
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
It's Worth the Effort
3n
188
29k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
820
The Cult of Friendly URLs
andyhume
79
6.8k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
120
Everyday Curiosity
cassininazir
0
130
Transcript
CSS!
I want to...
I want to make cool stuff.
I want to make cool stuff, fast.
I want to make cool & maintainable stuff, fast.
Let’s make an app.
Let’s make our app look awesome.
Let’s make it easy to make our app look awesome.
/css /components /base /utilities main.css
The individual building blocks /components The fundamental rules /base Classes
for adjusting CSS within templates /utilities All the above imported main.css
Variables
SASS Variables $color-primary CSS Variables var(—-color-primary)
Pre-processing
SASS & LESS Pre-processors REWORK & POSTCSS Pre-processing plugin frameworks
Building, watching & reloading.
Let’s start making our app look cool.
Naming
BEM Block, Element, Modifier
Block block Element block__element Modifier block__element—-modifier
Cue human body analogy
Block block Element block__element Modifier block__element—-modifier
Block person Element person__arm Modifier person__arm—-left
Maybe not .person__arm__hand__finger Maybe .person .arm .hand__finger—-ring
HTML
HTML + CSS
HTML + CSS + JS
<div></div>
<div class=“person”> <div class=“person__arm person__arm—-left”> Left arm </div> <div class=“person__arm
person__arm—-right”> Right arm </div> </div>
<div class=“person”> <div class=“person__arm person__arm—-left”> Left arm </div> <div class=“person__arm
person__arm—-right”> Right arm </div> </div> /css/components/person.css .person {} .person__arm {} .person__arm—-left {}
<div class=“person”> <div class=“person__arm person__arm—-left”> Left arm </div> <div class=“person__arm
person__arm—-right u-margin-Tm”> Right arm </div> </div> /css/utilities/space.css .u-margin-Tm { margin-top: var(—-space-medium); }
Utilities
<div class=“u-display-block u-margin-Vm u-color-primary u-background-meta u- padding-Lm u-padding-Rs u-text-heading u-
text-m u-text-no-smoothing”> Forever alone </div>
<div class=“u-display-block u-margin-Vm u-color- primary u-background-meta u-padding-Lm u-padding- Rs u-text-heading
u-text-m u-text-no-smoothing”> Much CSS </div> <div class=“u-display-block u-margin-Vm u-color- primary u-background-meta u-padding-Lm u-padding- Rs u-text-heading u-text-m u-text-no-smoothing”> Very stylesheets </div> <div class=“u-display-block u-margin-Vm u-color- primary u-background-meta u-padding-Lm u-padding- Rs u-text-heading u-text-m u-text-no-smoothing”> Such utility class </div>
<div class=“my-cool-component”> Much CSS </div> <div class=“my-cool-component u-text-no-smoothing”> Very stylesheets
</div> <div class=“my-cool-component u-background-meta”> Such utility class </div>
Our app Lets us work quickly Easy to maintain Looks
awesome
Cheers!