W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css3-background]

From: Lev Solntsev <greli@mail.ru>
Date: Tue, 28 Feb 2012 14:11:00 +0400
To: www-style@w3.org
Message-ID: <op.wadvwmf539dhqv@lev-pc.mlan>
Of course I can use gradient, Image() or whatever. But isn't it a hack and
workaround while there is a more obvious way for authors, is it?
Also I have concerns about performance issues in browsers and
those concerns contradict to accessibility—what web was created for.

http://www.w3.org/Style/CSS/ says that “Cascading Style Sheets (CSS)
is a simple mechanism for adding style (e.g., fonts, colors, spacing)
to Web documents.”

Using any of these workarounds make things more complex than it could be.

Philippe Wittenbergh <ph.wittenbergh@l-c-n.com> писал(а) в своём письме  
Tue, 28 Feb 2012 12:46:05 +0400:

> On Feb 28, 2012, at 4:37 PM, Brad Kemper wrote:
>>> 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.
>> Or you could create an inner (inset) shadow with a really large spread  
>> (no blur or offsets needed). Or you could use ::before to create an  
>> absolutely positioned box that fills up the width and height of the  
>> element. These are hacks, of course, but are more or less usable now  
>> (the second one would work in more versions of IE).
> Or use a gradient with the same start and stop colors to overlay the  
> background-image…
> div { background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)),  
> url(path/to/image.png) yellow }
Received on Tuesday, 28 February 2012 10:11:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:12 UTC