My new post: “Querying the Color Scheme”.
-
My new post: “Querying the Color Scheme”.
https://blog.kizu.dev/querying-the-color-scheme/
Media queries are nice, but for many things, we don’t even need them: there is this great #CSS property `color-scheme`, which allows us to make various things adapt to the current color scheme. We can even set it on a per-element basis. This post describes how we can use registered custom properties and style queries to read the current value of a `light-dark()` color for styling any non-color properties as well.
-
Marijke Luttekesreplied to Roma Komarov last edited by
@kizu I want to refactor my blog's old SCSS to regular CSS now that nesting is a feature, and the light-dark() makes it extra tempting to do.
Copyright © 2024 NodeBB | Contributors