[css-images-4] Color stop fixup: do interpolation hints function as positioned color stops?
@AmeliaBR is already working on this.
Since May 22, 2019.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
I'm looking at adding support for color stop positions and interpolation hints to a color library I've been working on, and it's not clear for me from the spec: when fixing up color stops, and we spread color stops missing a position position evenly between the color stops which have one:
- If any color stop still does not have a position, then, for each run of adjacent color stops without positions, set their positions so that they are evenly spaced between the preceding and following color stops with positions.
...do the color hints count as color stops in step 3 of the process?
Here's my library's interpretation (top) vs. browser interpretation (bottom) of the following gradient:
linear-gradient(to right, blue, red, 50%, green)
Is it normal that by introducing a color hint between red and green, the position of red shifts from 0.5 to 0.25? My mental model for the process resembled Photoshop's behavior, where moving the midpoints between two stops would not alter the position of the stops.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.