W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Wed, 13 May 2020 04:59:21 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-627746495-1589345960-sysbot+gh@w3.org>
1. It's an intentional change. It lets you provide fallback of a different type entirely when the argument is missing. (Like `width: attr(w px, auto);`)

2. Fallback isn't parsed at all. The WPT looks like it's wrong? It will fail to parse the attribute (since "300px" isn't a number), then substitute in 200, which isn't a valid 'width' value in non-quirks pages, making the div iacvt so it reverts to "auto" and won't match the ref.

3. Yes, that's fine. Fallback isn't parsed by attr() at all.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4482#issuecomment-627746495 using your GitHub account
Received on Wednesday, 13 May 2020 04:59:23 UTC

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