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
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
「SaaSの次の時代」に重要性を増すステークホルダーマネジメントの要諦 ~解像度を圧倒的に高めPdMの価値を最大化させる方法~
kakehashi
PRO
3
2.4k
はじめての MagicPod生成AI機能 機能紹介から活用方法まで
magicpod
0
110
Microsoft 365 / Microsoft 365 Copilot : 自分の状態を確認する「ラベル」について
taichinakamura
0
340
[最強DB講義]推薦システム | 評価編
recsyslab
PRO
0
100
AgentCore Managed Harness を使ってみよう
yakumo
2
200
クラウドネイティブな開発 ~ 認知負荷に立ち向かうためのコンテナ活用
literalice
0
150
独断と偏見で試してみる、 シングル or マルチエージェント どっちがいいの?
shichijoyuhi
1
110
No Types Needed, Just Callable Method Check
dak2
1
1.7k
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
110
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
110
AIコーディング時代における、ソフトウェアサプライチェーン攻撃に対する防衛術(簡易版)
soysoysoyb
0
120
Keeping Ruby Running on Cygwin
fd0
0
170
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Exploring anti-patterns in Rails
aemeredith
3
320
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
360
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
170
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to train your dragon (web standard)
notwaldorf
97
6.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Chasing Engaging Ingredients in Design
codingconduct
0
170
Raft: Consensus for Rubyists
vanstee
141
7.4k
Fireside Chat
paigeccino
42
3.9k
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