w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.46k stars 658 forks source link

[css-images-4] Allow gradient color stops to have two locations #2439

Open LeaVerou opened 6 years ago

LeaVerou commented 6 years ago

Hi all,

Last week we cleared conic-gradient() for shipping.

It turns out that many conic gradient demos are also using the two position color stop syntax, since the conic-gradient() polyfill supported that too, so the Chrome developer implemented that as well. He asked me today if this has to wait until CR or it can be shipped alongside conic-gradient().

The feature is that gradient color stops can have two positions, and they are expanded into two consecutive color stops with the same color, which is useful for creating "bands" of color.

My arguments for clearing this too:

css-meeting-bot commented 6 years ago

The Working Group just discussed Clear gradient color stops with two locations for shipping, and agreed to the following resolutions:

The full IRC log of that discussion <dael> Topic: Clear gradient color stops with two locations for shipping
<ChrisL> q+ to a) express support for dry two-location stops and b) ask whether chrome does computed-value-time fixup or post-layout fixup
<dael> github: https://github.com/w3c/csswg-drafts/issues/2439
<dael> leaverou: Two weeks ago we cleared conic gradient for shipping. Turns out many conic gradient in the wild were using the two locatiosn. It's been in the draft for 6 years. Chrome impl a year ago because it was in many demos
<dael> leaverou: Dev that impl asked if he can ship it as well. Chrome impl a year ago. I don't see why not.
<dael> ChrisL: I think it's an obvious good thing.
<dael> leaverou: It's what I said in issue.
<dael> ChrisL: Question for chrome folks. THere's a question in the spec as to if fixup applies before or after layout. I don't think that effects this issue.
<dael> leaverou: I don't see why depend on layout
<dael> ChrisL: There's an issue that says it might
<fantasai> I thought we resolved on that in Tokyo?
<dael> TabAtkins: Not sure
<dael> ChrisL: Can you find out?
<dael> ChrisL: IN general I support this.
<AmeliaBR> +1, this is a very useful syntax (especially when using variables in gradients), doesn't involve any new rendering code, only computed value changes.
<dael> ChrisL: People are using it and it's a trvial extension.
<dael> Rossen_: Hearing some support. Other opinions? Esp from Chrome folks who are shipping?
<dael> TabAtkins: I'm fine with shipping I agree it's minor feature very useful.
<tantek> we have tests?
<fantasai> ChrisL, https://lists.w3.org/Archives/Public/www-style/2017May/0051.html
<leaverou> tantek: we don't have test for ANYTHING about gradients!
<leaverou> s/test/tests/
<tantek> SMH
<dael> Rossen_: Objections to color stops are extended into their consecutive color stops?
<dael> leaverou: Color stops with two positions
<tantek> so now we're agreeing to ship features based on demoware?
<AmeliaBR> It's basically adopt https://drafts.csswg.org/css-images-4/#color-stop-syntax
<leaverou> Color stops with two positions are expanded to two consecutive color stops with the same color
<dael> frremy: This is in spec we just have to say fine to ship
<dael> leaverou: Yes.
<dael> Rossen_: I heard no objections.
<dael> RESOLVED: clear gradient color stops with two locations for shipping
<tantek> just WD right?
smfr commented 6 years ago

Please don't use "clear" in the context of colors unless you are referring to "the clear color"

tabatkins commented 6 years ago

"The clear color" isn't even a term of art!