The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
1–10 of 74 posts
Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#2Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#3Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#4This is how standards get bloated.
Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#5
then, in in-line CSS: @media (prefers-color-scheme:dark){body{background-color:#000;color:#eee}img{filter:brightness(.9)}}
I'm not seeing this new thing as a huge win so far.Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#6Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#7I guess it's better than nothing, but this does not feel like a very CSS way of solving this problem. I think I'd rather write a separate block of styles for dark mode, the way you do for other media queries. Happy to hear why that's wrong though.
Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#8My entire automatic light/dark support is, very early in the HTML: then, in in-line CSS: @media (prefers-color-scheme:dark){body{background-color:#000;color:#eee}img{filter:brightness(.9)}} I'm not seeing this new thing as a huge win so far.
I have everything set to dark mode, but I wouldn't want the images altered. Unless these are just navigational images on your site and you don't have any photos?
Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#9I wish they would just enable features that are already in the browser that they've not put live, like grid-template-rows: masonry. All three major engines have the damned thing in there but it's not in release branch.
Re: The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
#10Oof. Unless I’m missing something, this is a convenience that doesn’t enable anything new and uses syntax/terms that don’t naturally generalize for future applications. It just embeds one recent trend in very specific, very rigid terms. This is how standards get bloated.