Re: [csswg-drafts] [css-images-4] Allow gradients with a single color stop and 0-1 positions (#10092)

> So does the first allocated position win, giving 0%? Because by the second clause, it does have a position?

Note the <https://github.com/w3c/csswg-drafts/commit/ad21e29d70c8c845745e9d6eedda0b8b7c856558> edit, which separates the first/last assignment into separate steps, so the "in order" requirement handles this clearly.

> a position of 50% for a single color stop gradient is preferable. 

Putting the single stop literally anywhere has the exact same effect, per spec. I'd prefer not to add special-case text for single-stop gradients just to give them a special position; letting their position fall out of the existing fixup is preferable to me.

> As currently described, if a new stop is inserted at the start, which wins? And what is the intended result? 50% gives a more natural meaning when stops are added.

I'm not sure what you mean here. When/how are you "inserting a new stop", and what are you observing as a result? If you just edit your stylesheet to now have two stops, you get the fixed-up result of two stops (0% and 100%). If you, say, swap to a two-stop gradient on hover or something, you'll be changing the gradient length and thus won't get any animation, so it's not observable where the original stop was positioned.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10092#issuecomment-2239751481 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 19 July 2024 17:45:00 UTC