W3C home > Mailing lists > Public > www-style@w3.org > November 2009

Re: [gradients] basics

From: Simon Fraser <smfr@me.com>
Date: Sun, 08 Nov 2009 17:03:44 -0800
Cc: Brad Kemper <brad.kemper@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, www-style <www-style@w3.org>
Message-id: <65FFE829-1147-429A-A3C4-E8A6DA950C87@me.com>
To: news@terrainformatica.com
On Nov 8, 2009, at 2:44 pm, Andrew Fedoniouk wrote:

>>
> As a web designer I can imagine use of two gradients (or images) on  
> the same element. But as an implementor I will not even try to  
> create possibility to have two or more gradients (images here too) on
> background of single element.

background-image can already take multiple images:
<http://www.w3.org/TR/css3-background/#the-background-image>

If you implementation has the notion of "generated images", then  
supporting multiple background gradients on an element should be  
trivial.

> To make any sense multilayer gradients should have transparency. In  
> design tools like image editors you have a luxury to use multiple  
> layers
> with alpha-blending but on live, dynamic pages this has to be  
> avoided as
> much as possible.
>
> In any case I see value of say these:
>
> foreground-image:url(clock-cover-glass.png)
> background-image:url(clock-face.png)
>
> where foreground-image is drawn on top of content layer.
>
> But I see almost no value for, say, this:
> background-image:url(clock-face.png),url(clock-cover-glass.png);
> It is better to ask designer to combine these images upfront -
> visitors will benefit from that.

There are very good arguments for supporting multiple background  
images, but let's keep to the gradient discussion here.

> Just for the note: I have in years support of gradients in CSS in
> the form:
> background-color: color | color-tl color-tr color-br color-bl;
>
> where four colors define colors in corners of background box.
> This simple construction covers most of linear/radial/diamond-gradient
> cases and was proven to be very intuitive (for web designers) and  
> simple.

The current proposal does not, indeed, have anything that would allow  
you to do these types of color blends between corners, or diamond- 
shaped gradients.

Simon
Received on Monday, 9 November 2009 01:04:56 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:22 GMT