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
データモデリング通り #5オンライン勉強会: AIに『ビジネスの文脈』を教え込むデータモデリング
datayokocho
0
290
20260515 ログイン機能だけではないアカウント管理を全体で考える~サービス設計者向け~
oidfj
1
720
既存プロダクトQAから新規プロダクトQAへ
ryotakahashi
0
160
Gaussian Splattingの実用化 - 映像制作への展開
gpuunite_official
0
200
AWS WAFの運用を地道に改善し、自社で運用可能にするプラクティス
andpad
1
380
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
4
240
鹿野さんに聞く!CSSの最新トレンド Ver.2026
tonkotsuboy_com
6
3.6k
LookerとADKで作る社内AIエージェント
chanyou0311
0
260
マンション備え付けのネットワークとLTE回線を組み合わせた ネットワークの安定化の考案
harutiro
1
140
オライリーイベント登壇資料「鉄リサイクル・産廃業界におけるAI技術実応用のカタチ」
takarasawa_
0
410
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
1
360
AsyncStreamでマルチブロードキャストを実装する
1mash0
1
120
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
760
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
ラッコキーワード サービス紹介資料
rakko
1
3.3M
Typedesign – Prime Four
hannesfritz
42
3k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
370
Evolving SEO for Evolving Search Engines
ryanjones
0
190
Statistics for Hackers
jakevdp
799
230k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
How to Talk to Developers About Accessibility
jct
2
200
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
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