8000 [css-variables] Unable to do feature matching at parse time when using var() · Issue #1348 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-variables] Unable to do feature matching at parse time when using var() #1348

@alancutter

Description

@alancutter

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0