Re: [gradients] basics

Brendan Kenny wrote:
> On Mon, Nov 9, 2009 at 2:21 AM, Andrew Fedoniouk
> <news@terrainformatica.com> wrote:
>> ----- Original Message ----- From: "Ph. Wittenbergh"
>> <jk7r-obt@asahi-net.or.jp>
>> To: "www-style List" <www-style@w3.org>
>> Cc: "Andrew Fedoniouk" <news@terrainformatica.com>
>> Sent: Sunday, November 08, 2009 10:36 PM
>> Subject: Re: [gradients] basics
>>
>>
>>> 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)
>> This is a bit weak case I would say as:
>>
>> Alpha-math theorem:
>> For any semi-transparent gradient on top of image there is always such a
>> combination of  some gradient with semi-transparent image
>> on top of it that produce the same visual result.
>>
>> Do I need to prove it or is it clear enough?
> 
> This is not true if the transparency is not constant and dimensions
> are not known beforehand.

Yeah, seems I was wrong in general case. Here is what I tried to prove:
http://www.terrainformatica.com/w3/gradient.png


> 
> e.g. the effect of changing the font size in the provided example
> cannot be simulated in that way.
> 
>> I strongly believe that benefit of having gradients and other synthetic
>> background color distibutions to be addressible independently from images
>> significantly overweights any multi-layer tricks that can be achieved.
> 
> Can you be specific about what you want to be addressable beyond what
> is available through the different properties of multiple background
> images?
> 

Say you have following:

// file common.css
body { background: linear-gradient() }

// file A.css
body { background: url(a.png) repeat }

// or file B.css
body { background: url(b.png) repeat }

The task is to be able to keep in
A.css all other background settings defined in common.css



-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Monday, 9 November 2009 17:41:19 UTC