light-dark()

Making dark mode easy since 2024

light-dark(<light-color>, <dark-color>) allows you to easily set colors respecting the user or author preferred color-scheme.

Change your OS (or devtools) light mode to see it in action, or click the sun / moon icons to enforce light or dark mode respectively.