Skip navigation
CSS's light-dark() now accepts images, making it simpler to define alternate values for a dark color…
0:00 / 0:46

CSS's light-dark() now accepts images, making it simpler to define alternate values for a dark color…

Firefox for Web Developers

@FirefoxWebDevs90K followers

Visit on X
134 likesDownloadOriginal post

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)

  • Peter Cruckshank's profile picture

    @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

  • myf (formerly myf)'s profile picture

    @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! :/