The trick I’m going to show you will make anyone who knows enough about color cringe (sorry Chris!) but it does help you create a dark mode that works in minutes. The basic idea is to use custom properties for the lightness of colors instead of the entire color. Then, in dark mode, you override these variables with 100% - lightness. This generally produces light colors for dark colors, medium colors for medium colors, and dark colors for light colors, and still allows you to define colors inline, instead of forcing you to use a variable for every single color.
How do we plan future-proof styles in a world with an infinite degree of device and user ability variance? Let’s explore how things can break and how modern CSS provides solutions, by creating a robust comment thread component.
But what if you want to go the other way with specificity and lower it instead? Well, that’s the whole point of the :where() pseudo-selector. Functionally, it’s exactly the same as :is(). You give it a comma-separated list of things to select as part of the selector chain, and it does, with the same forgiving nature. Except, the specificity of the entire :where() part is zero (0).
I’m continually amazed at how resistant so many senior-level developers are to documentation. I don’t care how many years of experience you have or how technically capable you are. If you refuse to elevate the people around you, you’re not a senior anything.