Re: Colour gradient backgrounds.

On Monday, May 10, 2004, 7:57:11 PM, Andrew wrote:

>> Robin Berjon wrote:
>> > Andrew Fedoniouk wrote:
>> >
>> >> background-color:
>> >>
>> gradient(colorTopLeft,colorTopRight,colorBottomLeft,colorBottomRight)
>> >
>> > That's still not very generic. A good way to do that would be to simply
>> > use SVG. It'll do the job very well.
>> I agree. Introducing this into CSS would create unnecessary
>> redundancies. CSS should allow for styling, but actual graphical
>> elements (like a non-solid colored background) is best kept in images.

AF> I agree too. If we will implement non-solid colored background with
AF> *stretch*
AF> [e.g.
AF> this will cover gradient cases.

Yes, it will. The need for a background image to stretch, as an
alternative to tiling, had been known for some time.

AF> Only one: gradient is easy to implement and being implemented it is and will
AF> be popular.

I agree that gradients in SVG have already been implemented for years,
are easy and popular. I disagree with your next statement:

AF> But images for gradient fill are not so good to be compressed effectively.

This is incorrect. Even for raster images, PNG and to an extent JPEG
are able to compress a vertical gradient well and a horizontal
gradient moderately well. GIF can't, but, well, its not a very good

SVG can express a gradient very compactly, as it only stores the
colors, opacities and positions of the gradient stops plus the type of
gradient (radial or linear), the angle and skew of the gradient, and
treatment of colors past the end stops(pad, repeat, reflect).

AF> As you might know IE has gradient feature already.

As you might know SVG has a gradient feature already. But that does
not affect CSS in terms of the spec. The CSS spec merely says
that images can be used as backgrounds; adding an option to stretch
rather than tile is all that is required.

SVG already places an additional conformance criterion on
implementations that do both CSS and SVG, so with the stretch addition
to CSS we would be all set.

 Chris Lilley          
 Chair, W3C SVG Working Group
 Member, W3C Technical Architecture Group

Received on Monday, 10 May 2004 15:00:33 UTC