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
46
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
63
Browser Rendering & Performance
dangodev
0
52
Virtual & Augmented Reality
dangodev
0
110
Design of the Web (2017)
dangodev
0
88
The Science of Font Selection
dangodev
2
500
Other Decks in Technology
See All in Technology
なぜ、IAMロールのプリンシパルに*による部分マッチングが使えないのか? / 20260518-ssmjp-iam-role-principal
opelab
1
130
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
4
240
サイボウズ、プラットフォームエンジニアリング始めるってよ ― プラットフォームチームの事業貢献と組織アラインメントの強化
ueokande
0
120
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
190
20260515 ⾃分のアカウントとプライバシーを守る認証と認可の話〜利⽤者向け〜
oidfj
0
670
パーソルキャリア IT/テクノロジー職向け 会社紹介資料|Company Introduction Deck
techtekt
PRO
0
220
Purview Endpoint DLP 動かしてみた
kozakigh
0
440
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.5k
クラウドからエッジまで ~ 1,700台を支える監視設計~
optfit
0
110
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
160
データモデリング通り #5オンライン勉強会: AIに『ビジネスの文脈』を教え込むデータモデリング
datayokocho
0
290
AWSアップデートから考える継続的な運用改善
toru_kubota
2
300
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
It's Worth the Effort
3n
188
29k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
300
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Automating Front-end Workflow
addyosmani
1370
200k
How to Ace a Technical Interview
jacobian
281
24k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Balancing Empowerment & Direction
lara
6
1.1k
First, design no harm
axbom
PRO
2
1.2k
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