W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2019

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

From: Cameron McCormack via GitHub <sysbot+gh@w3.org>
Date: Wed, 13 Nov 2019 04:51:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-553238181-1573620663-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:56 UTC