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

[csswg-drafts] [css-variables] Unable to do prefix matching at parse time when using var()

From: alancutter via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 May 2017 01:25:52 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-227853801-1494465951-sysbot+gh@w3.org>
alancutter has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-variables] Unable to do prefix matching at parse time when using var() ==
When using var() references you can no longer rely on parse time failure to automatically match on supported syntax/features.

See example from user bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=700445#c13
```
--x1: url(data:image/png;base64,<PNG>);
--x2: url(data:image/png;base64,<PNG>);
background-image: var(--x1);
background-image: image-set(var(--x1) 1x, var(--x2) 2x);
```

One workaround for this use case is to use @supports. Is this a desirable state of the API or should the fallback behaviour that used to happen at parse time be brought to variable resolution in some form?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1348 using your GitHub account
Received on Thursday, 11 May 2017 01:25:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC