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
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
57
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
ガバメントクラウドでのランサムウェア対策
techniczna
2
1k
GitHub CopilotのFinOps- AI CreditのObservabilityと価値を生むためのエージェント設計
yuriemori
0
140
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.1k
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
370
ラジオの科学
frievea
0
280
toio・myCobotでフィジカルAIっぽいことを行うための検討(とりあえず調査) / フィジカルAI LT(IoTLTによる開催)
you
PRO
0
300
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
AIは実装を速くする。では、私たちは何を今作るべきか?-立場を越えてリリースに向き合ったチーム開発の実践 / 20260801 Hiromi Nakaya and Naoki Takahashi
shift_evolve
PRO
3
450
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.6k
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
6
1k
【CEDEC2026】グラフィックスエンジニアのためのニューラルシェーディング入門
cygames
PRO
0
130
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
0
120
Featured
See All Featured
Bash Introduction
62gerente
615
220k
Everyday Curiosity
cassininazir
0
270
From π to Pie charts
rasagy
0
260
The Curse of the Amulet
leimatthew05
2
14k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
990
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
500
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
470
The agentic SEO stack - context over prompts
schlessera
0
860
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