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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
58
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
Digitization部 紹介資料
sansan33
PRO
2
7.8k
AIレビュー時代に必要なのは、SLOで引く撤退ライン
nobuoooo
0
150
顧客の要望は2次情報である 〜アンテナを張るFDEの構造論〜
noriakioji
5
1k
Kiro5兄弟のいまどきのセキュリティ基礎知識
kentapapa
0
380
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.2k
Windows の互換機能 - 古いプログラムはなぜ動作できるのか
murachiakira
PRO
0
130
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
20k
アクセスキー流出時の対応で再認識した攻撃側と防御側の非対称性について
kazzpapa3
1
440
信頼性はSREだけのものじゃない
hkawaras
0
300
AI駆動開発を組織で促すために
lycorptech_jp
PRO
7
8.7k
Claude Codeの体系的な理解と知識のフック
oikon48
8
6k
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
4 Signs Your Business is Dying
shpigford
187
23k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
280
The Cult of Friendly URLs
andyhume
79
7k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
260
How STYLIGHT went responsive
nonsquared
100
6.2k
The SEO identity crisis: Don't let AI make you average
varn
0
540
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
830
First, design no harm
axbom
PRO
2
1.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
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