Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 449 Bytes

prefers-color-scheme.md

File metadata and controls

11 lines (7 loc) · 449 Bytes

The prefers-color-scheme CSS media feature is used to detect if a user has requested light or dark color themes. A user indicates their preference through an operating system setting (e.g. light or dark mode) or a user agent setting.

Code example

@media (prefers-color-scheme: light) {}

@media (prefers-color-scheme: dark) {}