W3C home > Mailing lists > Public > www-style@w3.org > April 2007

Re: CSS Opacity

From: Pascal Germroth <pascal@germroth.name>
Date: Sun, 29 Apr 2007 12:17:54 +0200
Message-ID: <463470D2.5000607@germroth.name>
To: Zoffix Znet <zoffix@zoffix.com>
CC: www-style@w3.org

Hello,

Zoffix Znet schrieb:
> I think it is very inconvenient that when you set opacity on an element
> you cannot make descendants opaque.

> You want to show a photo in the middle of the page and make the rest of
> the page semi-transparent.
> 
> body { opacity: .5; }
> 
> Will make the photo semi-transparent as well.
> 
> #photo { opacity: 1; }
> 
> Will not fix this.

Maybe values > 1 should be allowed for opacity? For example:

#photo { opacity : 2; }

Would mean that the element, whose pixels have an "effective" opacity of
0.5 would have the "effective" opacity of its pixels doubled, to 1.0,
meaning they are rendered with double opacity, which is then halved by
the body element and appears thus just plain opaque to the viewer.

I don't know if this could be implemented as graphics libraries often
"clamp" the colour values to [0;1]...


-- 
pascal
Received on Sunday, 29 April 2007 10:18:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:50 GMT