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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Drew Powers
June 21, 2018
Technology
43
0
Share
Styling in React
Drew Powers
June 21, 2018
More Decks by Drew Powers
See All by Drew Powers
Styling Systems in React
dangodev
0
59
Browser Rendering & Performance
dangodev
0
50
Virtual & Augmented Reality
dangodev
0
110
Design of the Web (2017)
dangodev
0
85
The Science of Font Selection
dangodev
2
490
Other Decks in Technology
See All in Technology
AI時代 に増える データ活用先
takahal
0
310
Route 53 Global Resolver で高額課金発生!
otanikohei2023
0
120
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
180
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
36k
AI: Making Admin and Users, Lives Better
kbmsg
0
110
Class.new is all you need
riseshia
1
130
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
140
Hacobu Tech Deck
hacobu
PRO
0
120
MLOps導入のための組織作りの第一歩
akasan
0
360
260422_Sansan_Tech_Talk__関西_vol.3_データ活用のリアル__矢田__.pdf
sansantech
PRO
0
120
「責任あるAIエージェント」こそ自社で開発しよう!
minorun365
9
2.2k
巨大プラットフォームを進化させる「第3のROI」
recruitengineers
PRO
2
1.1k
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
3.1M
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
120
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
300
Done Done
chrislema
186
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
The agentic SEO stack - context over prompts
schlessera
0
760
Into the Great Unknown - MozCon
thekraken
41
2.4k
The Invisible Side of Design
smashingmag
303
52k
New Earth Scene 8
popppiees
3
2.1k
Practical Orchestrator
shlominoach
191
11k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
210
How STYLIGHT went responsive
nonsquared
100
6.1k
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