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
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
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
370
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
0
320
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
1.5k
使いにくいの壁を突破する
sansantech
PRO
1
110
(金融庁共催)第4回金融データ活用チャレンジ勉強会資料
takumimukaiyama
0
120
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
390
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
なぜ今、コスト最適化(倹約)が必要なのか? ~AWSでのコスト最適化の進め方「目的編」~
htan
1
110
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
210
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
130
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Featured
See All Featured
Designing for Performance
lara
610
70k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
The SEO Collaboration Effect
kristinabergwall1
0
350
Between Models and Reality
mayunak
1
180
What's in a price? How to price your products and services
michaelherold
247
13k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
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