Skip to content

[css-images-4] multiple <image-set-option> with the same resolution #2652

@jonathantneal

Description

@jonathantneal

The specification describes a scenario where image-set() functions are invalidated.

Every <image-set-option> in a given image-set() must have a different <resolution>, or else the function is invalid.
https://drafts.csswg.org/css-images-4/#image-set-notation

This does not seem to reflect existing implementations. Neither Safari or Chrome fail to display an image in the following scenario:

html {
  background-image: -webkit-image-set(
    url(https://cloudfour.com/examples/image-set/assets/test.png) 1x,
    url(https://cloudfour.com/examples/image-set/assets/test-hires.png) 1x
  );
}

Both will use the last applicable <image>. Should this be reflected in the specification, or should we file browser bugs?

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