Re: [csswg-drafts] [css-contain-3] CSS-wide keywords in style() (#7080)

That's a good point for the CSS-wide keywords. They primarily only do something if they're the 'cascaded value', which they won't be here. (Looks like there's no exception for `initial`).

The same can not be said for e.g. `var(--x, revert)`, which does something computed-value time. But if you already think that `var()` is not allowed, then I guess there's no problem there.

I think it's a good idea to make the existing behavior explicit, as it was not obvious to me for from the spec language. In particular the part which says that values are "computed with respect to the container".

Perhaps we can somehow specify that for `style(foo: value)`, `value` must match the "actual"/"core" grammar of `foo`. And by "actual" grammar, what I mean is, if e.g. we look at the grammar for `width`: 

`auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)`

Nothing in there allows for `var()`, but we generally allow it anyway when we are parsing a declaration. Should probably explicitly say that this is not the case here.





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


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

Received on Friday, 25 February 2022 11:16:50 UTC