Duration
2 min
Access
Free
Transcript
Available

In this lesson, we use CSS variables with calc and hsl to implement a rudimentary dark mode.

We can do this by adjusting the lightness of our colors based on a binary value and some basic arithmetic.