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

Re: CSS Opacity

From: Raul Dias <raul@dias.com.br>
Date: Mon, 30 Apr 2007 08:13:58 -0300
To: Pascal Germroth <pascal@germroth.name>
Cc: Zoffix Znet <zoffix@zoffix.com>, www-style@w3.org
Message-Id: <1177931638.26746.11.camel@speedy.swi>

On Sun, 2007-04-29 at 12:17 +0200, Pascal Germroth wrote:
> Zoffix Znet schrieb:

> ...

> > 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]...

Just to confirm:
body { opacity: .5; }
and
#photo { opacity: .5; }

will result in a opacity of 0.5 and not 0.25, right? 
Meaning the values are absolute not relative.


If so, why not having a relative opacity like Pacal suggest to make
tranlucid object even more translucidy if the parent (that was supposed
to be 1) becomes translucid, this way keeping the proporcion of opacity.

Also, The way Zoffix wants opacity to be able to return from a parent
declaration should be consider in a "absolute" statement (but not in a
relative).  Yes, the calculation cost/memory to render this is high
right now.  However, all major OSes are moving to some kind of openGL
rendering.  

OS X has it for a while, Vista has it now and Linux have some
implementations of GLX X11/Composite.  It is a matter of time that
browser will take advantage of that.  It could be in FF 3.0, Opera 11
and IE 10, but it will happen sometime.  So the cost for rendering this
will be really lower compared to today.

As this is still a draft, shouldnt this be addressed right now?


-rsd
Received on Monday, 30 April 2007 11:16:22 GMT

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