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
prefers-color-schemaの話
Search
Matsui Masashi
April 12, 2019
Technology
0
570
prefers-color-schemaの話
Matsui Masashi
April 12, 2019
Tweet
Share
More Decks by Matsui Masashi
See All by Matsui Masashi
🔥 Hono v4 やってみた
circled9
1
57
JetBrains AI Assistant を試してみた
circled9
1
250
Fresh
circled9
0
190
React Hooks 勉強会 vol.3
circled9
2
340
JSON.stringify()
circled9
2
410
HTML
circled9
2
900
Bundle Transpile Rock'n'Roll
circled9
0
1.5k
Hello React hooks
circled9
0
690
細かくて伝わらないmacの小技選手権
circled9
0
780
Other Decks in Technology
See All in Technology
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
380
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
2
460
MapLibreとAmazon Location Service
dayjournal
1
150
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
150
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
440
オーナーシップを持つ領域を明確にする
konifar
13
3.1k
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
240
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
1
120
レガシーをぶっ壊せ。AEONで始めるDevRelの話 / Qiita Night 2024-2-22
aeonpeople
3
1.3k
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
190
Hands-on Gemini, the Google DeepMind LLM
meteatamel
1
110
Featured
See All Featured
Happy Clients
brianwarren
92
6.4k
Debugging Ruby Performance
tmm1
70
11k
Music & Morning Musume
bryan
41
5.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
For a Future-Friendly Web
brad_frost
172
9k
The Pragmatic Product Professional
lauravandoore
25
5.8k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
The Language of Interfaces
destraynor
151
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Building Your Own Lightsaber
phodgson
99
5.7k
Designing for Performance
lara
601
67k
Infographics Made Easy
chrislema
238
18k
Transcript
prefers-color-schemaの話 water-cell tech night #3 1
Intro prefers-color-schema はシステムのカラーテーマを検出するメディア特性。 Media Queries Level 5 に含まれている仕様の⼀つ。 User Preference
Media Features と呼ばれる仕様の⼀つ。 ちなみに現在の勧告は Media Queries Level 3 2
対応ブラウザ Firefox 67以降 (= Developer Edition) Safari 12.1以降 3
Example @media (prefers-color-scheme: light) { background-color: white; color: black; }
@media (prefers-color-scheme: dark) { background-color: black; color: white; } 4
Issue 画像などが元のままだと浮く 5
他のUser Preference Media Features prefers-reduced-motion(reduce): アニメーションなどの動きを減らす prefers-reduced-transparency(reduce): 透過表現を減らす prefers-contrast(high, low):
コントラストの⾼低を要求する 6
参考URL prefers-color-scheme を⽤いた Dark Mode 対応と User Preference Media Features
| blog.jxck.io prefers-color-scheme - CSS: カスケーディングスタイルシート | MDN 7