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

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