← You're writing dark-mode colors twice. `light-dark()` fixes that.Quiz
light-dark() — one rule, both color schemes
light-dark() collapses a light value and a dark value into a single declaration, replacing the duplicated @media (prefers-color-scheme: dark) block. These questions check the color-scheme prerequisite and its silent failure mode, what the argument order means, how a JavaScript theme toggle hooks into it, what the function will and won't accept, and how the fallback works in browsers that never shipped it.
questions8
pass mark70%
feedbackinstant
No account needed. Every answer is explained as you go, with a reference to the spec or MDN — pass and you can claim a certificate.