Re: [csswg-drafts] [css-values-4] Switch advanced attr() to being var()-like (#4482)

I'm generally in favor of the proposal modulo the concerns that Emilio and Henri raised.

I don't know if we have valid use cases for variable references inside `attr()`-referenced attributes, or vice versa.  But if we model attributes as another kind of variable, then we should be able to use the same iacvt processing when encountering cycles.

Is there any reason not to make all `attr()` values valid at parse time?

I do find it a little odd that the second argument to `attr()` names CSS syntax types and other operations like dimension value construction, and how e.g. `string` means take the literal string content and turn it into a `<string>` token, while `number` means to parse the attribute value as a `<number>` token.  I'm half wondering whether it makes sense to align with the syntax used for custom property registration for things like the latter.

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

Received on Wednesday, 13 November 2019 04:51:06 UTC