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
51
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Styling in React
Drew Powers
June 21, 2018
More Decks by Drew Powers
See All by Drew Powers
Styling Systems in React
dangodev
0
67
Browser Rendering & Performance
dangodev
0
57
Virtual & Augmented Reality
dangodev
0
120
Design of the Web (2017)
dangodev
0
95
The Science of Font Selection
dangodev
2
500
Other Decks in Technology
See All in Technology
組織にどうSREを根付かせるか?〜IVRyの場合〜
abnoumaru
0
330
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
12
8.4k
AI時代の強いチームの作り方
yuukiyo
26
16k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
220
Flutterをカメラで動かしたかった話
sony
1
130
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
1.6k
20260608_Codexの可能性_ノンプログラマー向け_大城追記
doradora09
PRO
0
780
OSPN.JPバージョンアップ作業進捗のご報告 / 20260801-osc26kyoto
akkiesoft
0
420
Cursor Meetup Sapporo - Cursor物語 続編
cocacola917
0
140
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
190
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
460
The SEO identity crisis: Don't let AI make you average
varn
0
530
So, you think you're a good person
axbom
PRO
2
2.1k
The Cult of Friendly URLs
andyhume
79
7k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
240
Automating Front-end Workflow
addyosmani
1370
210k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
Statistics for Hackers
jakevdp
799
230k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
Raft: Consensus for Rubyists
vanstee
141
7.6k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
400
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