$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Styling in React
Search
Drew Powers
June 21, 2018
Technology
0
35
Styling in React
Drew Powers
June 21, 2018
Tweet
Share
More Decks by Drew Powers
See All by Drew Powers
Styling Systems in React
dangodev
0
54
Browser Rendering & Performance
dangodev
0
45
Virtual & Augmented Reality
dangodev
0
100
Design of the Web (2017)
dangodev
0
79
The Science of Font Selection
dangodev
2
480
Other Decks in Technology
See All in Technology
[CMU-DB-2025FALL] Apache Fluss - A Streaming Storage for Real-Time Lakehouse
jark
0
110
AWS re:Invent 2025で見たGrafana最新機能の紹介
hamadakoji
0
130
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
510
ガバメントクラウド利用システムのライフサイクルについて
techniczna
0
180
プロダクトマネージャーが押さえておくべき、ソフトウェア資産とAIエージェント投資効果 / pmconf2025
i35_267
2
590
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
390
AI時代の開発フローとともに気を付けたいこと
kkamegawa
0
2.2k
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
250
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
210
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
1k
生成AI時代の自動E2Eテスト運用とPlaywright実践知_引持力哉
legalontechnologies
PRO
0
210
Challenging Hardware Contests with Zephyr and Lessons Learned
iotengineer22
0
120
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Designing for Performance
lara
610
69k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Music & Morning Musume
bryan
46
7k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Transcript
5 TIPS FOR STYLING IN REACT 1 2 3 4
5
AVOID NESTED SELECTORS 1 2 3 4 5
None
BEGUN, THE SPECIFICITY WAR HAS
KEEP LAYOUT WITHIN COMPONENTS 1 2 3 4 5
None
None
None
AVOID MAGIC NUMBERS 1 2 3 4 5
None
None
MAKE BREAKPOINTS WHEN IT LOOKS WEIRD (DON’T MANAGE GLOBAL BREAKPOINTS)
1 2 3 4 5
635 PX t HOME SHOP GALLERY ABOUT CONTACT 600 PX
/ 900 PX / 1200 PX / 1800 PX THE 100% CORRECT WAY TO DO CSS BREAKPOINTS
DON’T EXTEND STYLES 1 2 3 4 5 (PLEASE REPEAT
YOURSELF)
SASS STYLED COMPONENTS
COINCIDENCE
None
LEARN SIBLING SELECTORS 1 2 3 4 5 6 7
8
REACT • ONCLICK • HANDLE TAB KEY • HANDLE SPACE
BAR • HANDLE ACCESSIBILITY CSS
+ > ~ * [ ]
USE BETTER EASINGS 1 2 3 4 5 6 7
8
linear transition-timing-function border-color box-shadow color opacity transform: rotate cubic-bezier() transform:
scale translate MATERIAL.IO / DESIGN / MOTION / SPEED.HTML#EASING animation-timing-function
USE A RESPONSIVE TYPE SCALE 1 2 3 4 5
6 7 8
8 10 12 14 16 20 24 28 36 48
None
None
“RESPONSIVE TYPE SCALE”
THANKS! 1 2 3 4 5 @_DREWPOWERS