Re: [csswg-drafts] [css-images-4] Allow a single color stop with two positions (#10077)

Hey, thanks for working on this! Long overdue!

Here are some tests: https://codepen.io/leaverou/pen/eYodMoj (if anyone can port them to WPT after this is merged, that would be great)

And yes, the two position syntax works everywhere. Safari as well, just tested.

Looking at the change, it's a little unfortunate we have to define new separate tokens just to make sure that if we have a single color stop it has two positions. And it makes me wonder if we really need that. What purpose does it serve? What's the harm in simply allowing a single color stop, even if it has one position — or even none? You get a single color anyway, and allowing these would provide a smoother authoring experience for editors offering realtime updates. Even with the two color stop positions, you can specify both to be equal, so can't we just spec that a single position expands to that, and no position expands to `0% 100%` or something?

cc @tabatkins thoughts?


-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/10077#issuecomment-1998324780 using your GitHub account


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

Received on Thursday, 14 March 2024 20:00:57 UTC