Open Bug 1789918 Opened 2 years ago Updated 2 years ago

image-set() shouldn't allow nesting

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

People

(Reporter: sebo, Unassigned)

References

()

Details

Currently, Gecko allows to nest the image-set() function within itself. Though this is explicitly forbidden by the specification (and doesn't make much sense, anyway). The spec. says:

The image-set() function can not be nested inside of itself, either directly or indirectly (as an argument to another <image> type).

So the following CSS should display red and not green:

body {
  background-image: image-set(
    image-set(
      image-set(
        image-set(
          linear-gradient(green, green) 1x
        )
      )
    )

    , linear-gradient(red, red) 1x
  );
}

See https://github.com/w3c/csswg-drafts/issues/7662 where this initially came up.

Sebastian

Summary: image-set() doesn't allow nesting → image-set() shouldn't allow nesting

The severity field is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)
Severity: -- → S3
Flags: needinfo?(jwatt)
You need to log in before you can comment on or make changes to this bug.