Skip to content

[css-images-4] Gradient interpolation doesn't specify how to handle positionless stops at computed-value time #10374

Open
@tabatkins

Description

@tabatkins

The gradient-line "fixup" rules https://drafts.csswg.org/css-images-4/#color-stop-fixup do two things:

  1. Supply default positions for any stops that don't have them
  2. Shift stops that are positioned before earlier stops to instead coincide with them.

(2) needs to happen at used-value time since it might need to resolve percentages dependent on layout, so the entire process is defined as happening at used-value time. This means, tho, that position-less stops don't have positions at computed-value time, when they want to interpolate.

There's no reason to not fill in the positions at computed-value time; they're purely syntactic (either 0%, or 100%, or a naive interpolation between the nearest stops that do have a size). This just needs to be separated out.

(While we're at it, we should fix the other interpolation issue https://drafts.csswg.org/css-images-4/#interpolating-gradients about the length of the gradient line.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Not this meeting?

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions