CSS by T. Afif @css-only.dev · May 13

For me, the whole light-dark() thing will not be that useful once we get wide support for if() demo: codepen.io/t_afif/pen/Z...

1 likes 2 replies

?

Replies

CSS by T. Afif · May 13

Now I remember seeing this before: www.bram.us/2025/09/30/c... cc @bram.us

Ana Tudor · May 14

I just cannot get into `if()`, what it can do (when comparing to the Sass `if()`) is cool, but it feels clunky for numeric values. I'd write that as: ``` border: solid calc(8px - var(--dark)*3px) light-dark(blue, red) ``` where --dark could ideally be set as: ``` --dark: light-dark(0, 1) ```