Skip to content

[css-values-3] Serialisation of empty url() undefined #6447

@gsnedders

Description

@gsnedders

https://drafts.csswg.org/css-values-3/#url-empty, with tests at https://github.com/web-platform-tests/wpt/blob/master/css/css-values/urls/empty.html

This section states:

If the value of the url() is the empty string (like url("") or url()), the url must resolve to an invalid resource (similar to what the url about:invalid does).

This doesn't appear to define what the computed value of an empty url() is, thus it would appear to be undefined. The tests (by @emilio) assert that the value is about:invalid, rather than it merely being similar to it (resolving to an abstract invalid resource).

Compare with, under Relative URLs above:

When a <url> appears in the computed value of a property, it is resolved to an absolute URL, as described in the preceding paragraph. The computed value of a URL that the UA cannot resolve to an absolute URL is the specified value.

Current implementation status is:

  • Blink has not implemented e051892 (which changed the empty URL behaviour)
  • Gecko has, and uses about:invalid
  • WebKit has not implemented the change

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions