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
Styling in React
Search
Drew Powers
June 21, 2018
Technology
0
36
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
46
Virtual & Augmented Reality
dangodev
0
100
Design of the Web (2017)
dangodev
0
82
The Science of Font Selection
dangodev
2
480
Other Decks in Technology
See All in Technology
まだ間に合う! Agentic AI on AWSの現在地をやさしく一挙おさらい
minorun365
19
3.3k
20251222_サンフランシスコサバイバル術
ponponmikankan
2
150
Cloud WAN MCP Serverから考える新しいネットワーク運用 / 20251228 Masaki Okuda
shift_evolve
PRO
0
130
_第4回__AIxIoTビジネス共創ラボ紹介資料_20251203.pdf
iotcomjpadmin
0
160
LayerX QA Night#1
koyaman2
0
300
TED_modeki_共創ラボ_20251203.pdf
iotcomjpadmin
0
180
re:Invent2025 セッションレポ ~Spec-driven development with Kiro~
nrinetcom
PRO
2
160
Claude Codeを使った情報整理術
knishioka
15
11k
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
130
ルネサンス開発者を育てる 1on1支援AIエージェント
yusukeshimizu
0
130
Kiro を用いたペアプロのススメ
taikis
4
2.1k
通勤手当申請チェックエージェント開発のリアル
whisaiyo
3
630
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.2k
Discover your Explorer Soul
emna__ayadi
2
1k
Paper Plane
katiecoart
PRO
0
44k
Done Done
chrislema
186
16k
Bash Introduction
62gerente
615
210k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
A Soul's Torment
seathinner
1
2.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How STYLIGHT went responsive
nonsquared
100
6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
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