CSS · Functions and values
light-dark()
Chooses a colour based on the user’s colour scheme.
Syntax
light-dark(light, dark)Example
Try it
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.