Skip to content

[css-images] stripes() interpolation makes no sense #8163

@Loirooriol

Description

@Loirooriol

https://drafts.csswg.org/css-images-4/#interpolating-1d-images

There are only a few restrictions on what images are allowed to be interpolated:

  1. Both the starting and ending image must have the same number of <color-stripe>s.
  2. Neither image uses a combination of <length>, <percentage>, and <flex> stripes.

[...] Then, for each pair of stripes, interpolate the thickness and color independently.

How do you interpolate from stripes(#000 10px, #111 20px) to stripes(#222 10fr, #333 20fr)?
This is invalid, right? stripes(#111 calc(5px + 5fr), #222 calc(10px + 10fr))

I think that restriction 2 should be changed. Instead of checking that each <1d-image> does not mix different types, it should check that each pair of interpolated thicknesses does not mix different types.

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