CSS's light-dark() now accepts images, making it simpler to define alternate values for a dark color…
Firefox for Web Developers
Visit on X@FirefoxWebDevs90K followers
20,092 views
CSS's light-dark() now accepts images, making it simpler to define alternate values for a dark color scheme. Here's how it works:
2 Comments
Comments from the original post on X (Twitter)

@PeteCapeCod
I am ready for this!! I run into this issue all the time, and of course use media queries to handle it. But this feels much nicer 🍻
1 like

@myfonj
But, sadly, still not for anything other but colours and images -- and most likely will never be :(. So, you know how bright text on dark background looks bolder, so it is considered best practice to tone down the font-weight in the "dark mode" by 50-100 points? Media query! :/
