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

Re: [gradients] basics

From: Ph. Wittenbergh <jk7r-obt@asahi-net.or.jp>
Date: Mon, 9 Nov 2009 15:36:49 +0900
Cc: Andrew Fedoniouk <news@terrainformatica.com>
Message-Id: <92C26804-2052-42E9-9126-73E0F3ACF2A9@asahi-net.or.jp>
To: www-style List <www-style@w3.org>

On Nov 9, 2009, at 3:24 PM, Andrew Fedoniouk wrote:

> Ph. Wittenbergh wrote:
>> On Nov 9, 2009, at 1:29 PM, Andrew Fedoniouk wrote:
>>> background: linear-gradient(magenta yellow), url(...)
>>>
>>> has no visual effect but will force image to be downloaded.
>>> Image at url(...) will be covered by linear gradient in full.
>> background: linear-gradient(rgba(255,0,0,0.5), rgba(10,10,10,.25)),  
>> url(image.png);
>
> Why not
>
> background: url(image-with-that-gradient-on-top.png);
>
> ?
>
> This trick almost always requires knowledge about that
> image on your side so why not just to produce that image
> upfront?

Because the image is a small repeating thing (a pattern for example)  
and I've no idea how much content will go in the box ?

http://dev.l-c-n.com/CSS3_border-background/gradient3.html
(requires a recent Minefield build, didn't try to write the code for  
WebKit)

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/
Received on Monday, 9 November 2009 06:37:27 GMT

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