Re: [csswg-drafts] [css-values-5] typeof() or something similar to be used inside `if()` conditionals to check types of custom properties (#11741)

`is-type()` is somewhat reasonable, taking a `<syntax>` value.  As you show, you can achieve the effect in a roundabout way right now, and it seems somewhat reasonable to expose.

`typeof()`, tho, doesn't work. CSS tokens don't have types in and of themselves, they're parsed into typed constructs by a grammar. As you note, it's fundamentally ambiguous about what "type" a lot of values are.

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


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

Received on Tuesday, 4 March 2025 17:15:45 UTC