Re: [csswg-drafts] [css-variables?] Higher level custom properties that control multiple declarations (#5624)

I agree with @andruud fwiw. I don't understand why something like this:

> There are discussions in the group about inline conditionals [#4731, #5009]. If we were to have such conditionals, these would be possible to implement, but very painful (each declaration value would need to be one or more if()). I was wondering if we could simplify this.

Is really more painful / complex than what's being proposed here.

Basically, something like `border-radius: if(var(--pill), 0px, 999px);` seems simpler and much less action-at-a-distance to me.

In fact if you make `--pill` a boolean variable with values `0` or `1`, you can already accomplish this particular usecase (`border-radius: calc(var(--pill) * 999px)`), though I understand there are more complex use cases that aren't probably covered by such a thing (and also it is a bit more obscure than some more explicit syntax).

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5624#issuecomment-736834761 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 1 December 2020 21:34:37 UTC