Re: [css3-background]

28.02.2012, 00:35, "Tab Atkins Jr." <jackalmage@gmail.com>:
> On Mon, Feb 27, 2012 at 11:38 AM, Lev Solntsev <greli@mail.ru> wrote:
>
>> šHello!
>>
>> šNow CSS Backgrounds and Borders Module Level 3 working draft says that you
>> šcan specify color only on final background layer. It could be reasonable
>> šbecause one can see nothing under the solid colored background. But there is
>> šone option that left forgotten: semi-transparent colors, which can be
>> šdefined with hsla or rgba.
>>
>> šImagine, I may want to place a picture on background, then blend it by
>> šsemitransparent black or white, and place some picture on top. I can't do it
>> šnow with current background syntax and I believe that the specification must
>> šallow this scenario.
>>
>> šOf course, I can fake semitransparent color by a special cooked picture but
>> šis it what CSS is called to avoid, isn't it?
>
> As Brian points out, this restriction has been in B&B for years.

If restriction is unreasonable, it can and should be fixed. It does not matter how long the restriction did exist before.

> That said, you can achieve the effect you want by with the image()
> function <http://dev.w3.org/csswg/css3-images/#image-notation> by just
> putting the color you want inside of it, as illustrated in example 7
> at the link I gave.

This looks like a workaround. "rgba(0,0,255,.5)" is anyway better than "image(rgba(0,0,255,.5))" which is better than "some(nested(function(image(rgba(0,0,255,.5)))))" if they all have identical results.

Received on Tuesday, 28 February 2012 07:53:18 UTC