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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Drew Powers
June 21, 2018
Technology
0
37
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
490
Other Decks in Technology
See All in Technology
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
130
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
200
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
2
380
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
440
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
140
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.5k
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
390
システムのアラート調査をサポートするAI Agentの紹介/Introduction to an AI Agent for System Alert Investigation
taddy_919
2
1.7k
セキュリティ はじめの一歩
nikinusu
0
1.5k
Webhook best practices for rock solid and resilient deployments
glaforge
1
260
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
190
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
330
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Scaling GitHub
holman
464
140k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
How to make the Groovebox
asonas
2
1.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
240
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Optimizing for Happiness
mojombo
379
71k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Accessibility Awareness
sabderemane
0
48
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Odyssey Design
rkendrick25
PRO
1
490
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