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

Re: [gradients] basics

From: Brad Kemper <brad.kemper@gmail.com>
Date: Sun, 8 Nov 2009 11:58:42 -0800
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Simon Fraser <smfr@me.com>, www-style <www-style@w3.org>
Message-Id: <AE6F3F3C-8B02-404B-8F3F-49FED4E6986B@gmail.com>
To: news@terrainformatica.com

On Nov 8, 2009, at 10:43 AM, Andrew Fedoniouk wrote:

> background: linear-gradient(magenta yellow) url(...)
> background: url(...) linear-gradient(magenta yellow)

With the current draft, these would be treated as multiple background  
images, with the last one in the list on the bottom. So, no, they are  
not the same thing. But there are certainly reasons to be able to  
layer 2 gradients, or a gradient on top of another image:

When layering 2 gradients with transparency on the top one (at least),  
you can get more complex gradients that blend colors in two or more  
directions at once.
When layering a gradient over some other non-repeating background- 
image (a large logo, for instance), you can create a fade-out effect  
for that image, by blending from a color (matching the background- 
color) to transparent.
Similarly, you can create the effect that a normal patterned  
background is fading out as it gets closer to one edge, by putting a  
full-width/height linear-gradient over it that fades from a color to  
transparent.

It seems to me that we've already discussed these arguments at length  
in previous threads, and the working group resolved to continue with  
the concept of gradient-as-image. Let's work on that first, and  
resolve any issues with it before tackling a wider application of the  
concept to anything-with-a-color-can-have-a-gradient-instead.


Received on Sunday, 8 November 2009 19:59:27 GMT

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