Forum Moderators: not2easy

Message Too Old, No Replies

CSS Gradients

Isn't it about time for this?

         

sgietz

4:05 pm on Jun 24, 2009 (gmt 0)

10+ Year Member



Gradients on the net are a dime a dozen. I think it's about time this basic design tool becomes a CSS standard.

jameshopkins

11:37 pm on Jun 24, 2009 (gmt 0)

10+ Year Member



Are you referring to the Webkit proposal for CSS Gradients [webkit.org]?

The current Gradients spec isn't that well documented, and I'm sure there'll be some further collaboration with the SVG WG (Working Group) before the CSS WG decide whether the feature is in the scope of the next charter (in which they've already decided to include Webkit's Animations, Transformations, and Transitions).

swa66

11:58 pm on Jun 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Webkit (safari and chrome) has gradients via a proprietary property:
[webkit.org...]

And browsers that support SVG can do it that way too.

I've not seen much movement on this in the CSS3 docs that I read so far.

jameshopkins

12:31 am on Jun 25, 2009 (gmt 0)

10+ Year Member



And browsers that support SVG can do it that way too

I'm of the opinion that gradients should be left in SVG, as I've yet to hear any good reason why this we should be replicating this feature in CSS. Once SVG is supported for use as background-images, then SVG creation becomes trivial- especially since an editor can be used to generate the XML for the SVG.

Although it's only an experimental implementation, Webkits proposal is bulky to say the least, and opting for the SVG method also adds a useful abstration layer between stylesheet and the SVG document.

On that note, I'm actually quite surprised that the Gradients implementation has remained in public Webkit releases up until now. A comparable Webkit proposal was CSS Constants which was removed soon after public release due to fear about feature adoption amongst authors before the spec had any time to mature.

sgietz

9:39 pm on Jun 25, 2009 (gmt 0)

10+ Year Member



Well, I'm familiar with the webkit implementation. I would like to see this become a standard.

Just something simple that let's you set the start color, end color, type (i.e. linear, radial, etc.), perhaps the position of the gradient inside of the container. Nothing fancy, really.

A simple linear gradient with two colors should have been part of CSS for a long time.

Of course you could create a boatload of 1px divs stacked on top of each other, each with a slightly different color. I have seen that done, and it's absurd.