Xah Web Dev Blog
CSS: color scheme
By Xah Lee. Date:
2026-05-15
.
2026-05-15
CSS color scheme
wow. amazing discovery.
now you can just add this to have automatic dark theme, for all of your web pages.
:root
{
color-scheme
:
light
dark
; }
css color scheme 2026-05-15 18dc1
Dark Theme Display topics
Is Dark Theme Good for Your Eyes
CSS: Dark Theme
CSS: color scheme
JS DOM: Button to Switch to Dark Theme
Windows sucks: Dark Theme (2019)
PowerShell: Toggle Dark Theme 📜
emacs init: Set Color Theme
Emacs: Color Theme Gallery
Web Dev Search 🔍
HTML
CSS
JS
JS Obj Ref
DOM
SVG
CSS
Basics
Basics
Comment Syntax
Length Units
Selectors
Selector
Color
Color
Font
Font
Text Decoration
Text Deco
Margin, Border
Border
Margin, Padding
Layout
Layout
Layers
Position Property
Animation
2D Transform
Transition
Animation
Line Wrap
white-space Wrap
overflow-wrap
Text Justify
Misc
Media Query
Variable
calc
Reset
Dark Theme
Misc Index
Misc. Index