Re: [csswg-drafts] [css-values]: Express conditional values in a more terse way (#5009)

Losing the ability to do parse-time fallback, and thus the ability to future-proof your code by providing older, more widely-supported variants, isn't something we should give up lightly. It's been vital to allowing CSS to safely evolve over the years.  IACVT behavior was introduced to var() as an *unfortunate compromise*.

For @faceless2's example, for instance, they couldn't use `src()` in the function and provide a fallback `url()` for older browsers.

Also note my comment in <https://github.com/w3c/csswg-drafts/issues/5009#issuecomment-785524020>; if the output type is var-like than that means Typed OM can't offer any better representation for the output values than CSSUnparsedValue. `cond()`, on the other hand, can actually provide the output types as a CSSNumericValue, because it knows what type they are.

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


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

Received on Thursday, 25 February 2021 16:34:38 UTC