8000 [css-variables] Relative URL resolution in var() references · Issue #757 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-variables] Relative URL resolution in var() references #757

@LeaVerou

Description

@LeaVerou

Related discussions:
https://twitter.com/LeaVerou/status/801661659949371392
https://bugs.chromium.org/p/chromium/issues/detail?id=618165

Summary: Relative URL resolution in var() is underspecified and currently buggy in all browsers.
The main issue is, as @tabatkins pointed out in the second linked thread above is this:

/* a.css */
--a: "a.png";

/* b.css */
--b: url(var(--a));

/* c.css */
background-image: var(--b); /* resolved according to a, b, or c? */

Since CSS Variables are uninterpreted token streams, it should be c (which is what @dbaron and I think), but some members (such as @FremyCompany in the first thread) argue that this may not be useful to authors.

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