Property color-scheme

The color-scheme CSS property allows an element
to indicate which color schemes it can comfortably
be rendered in.

Adapting to color schemes
To opt the entire page into the user’s color
scheme preferences declare color-scheme on the
:root element.

:root {
  color-scheme: light dark;
}