css-tricks.com/using-light-dark-without-getting-caught-out

Using light-dark() without getting caught out

A developer compares CSS light-dark() with prefers-color-scheme media queries, noting the fallback risk Martin Underhill warned about and describing CSS-variable abstractions for flipping text and background colors. A CSS-Tricks comparison put the light-dark() build 12,262 bytes larger minified and 337 bytes larger with Brotli, leaving the author unsure he chose performance over developer experience.


No comments yet

Be the first to share your thoughts.