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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Drew Powers
June 21, 2018
Technology
0
42
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
58
Browser Rendering & Performance
dangodev
0
49
Virtual & Augmented Reality
dangodev
0
110
Design of the Web (2017)
dangodev
0
83
The Science of Font Selection
dangodev
2
490
Other Decks in Technology
See All in Technology
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
350
FASTでAIエージェントを作りまくろう!
yukiogawa
4
110
スピンアウト講座05_実践活用事例
overflowinc
0
1.3k
Bref でサービスを運用している話
sgash708
0
200
Phase08_クイックウィン実装
overflowinc
0
1.9k
Phase01_AI座学_基礎
overflowinc
0
4.2k
「AIエージェントで変わる開発プロセス―レビューボトルネックからの脱却」
lycorptech_jp
PRO
0
150
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
310
20年以上続く PHP 大規模プロダクトを Kubernetes へ ── クラウド基盤刷新プロジェクトの4年間
oogfranz
PRO
0
310
Change Calendarで今はOK?を仕組みにする
tommy0124
1
110
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
760
Phase03_ドキュメント管理
overflowinc
0
2.7k
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
420
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Accessibility Awareness
sabderemane
0
84
Building the Perfect Custom Keyboard
takai
2
720
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
470
Practical Orchestrator
shlominoach
191
11k
WENDY [Excerpt]
tessaabrams
9
37k
The Spectacular Lies of Maps
axbom
PRO
1
650
Java REST API Framework Comparison - PWX 2021
mraible
34
9.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