W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Additional value for the visibility property

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 09 Jul 2008 21:49:12 -0700
Message-ID: <487594C8.2010605@terrainformatica.com>
To: robert@ocallahan.org
CC: "Ph. Wittenbergh" <jk7r-obt@asahi-net.or.jp>, W3C Style List <www-style@w3.org>

Robert O'Callahan wrote:
> On Thu, Jul 10, 2008 at 4:14 PM, Andrew Fedoniouk 
> <news@terrainformatica.com <mailto:news@terrainformatica.com>> wrote:
> 
>     Robert O'Callahan wrote:
> 
>         On Thu, Jul 10, 2008 at 6:26 AM, Andrew Fedoniouk
>         <news@terrainformatica.com <mailto:news@terrainformatica.com>
>         <mailto:news@terrainformatica.com
>         <mailto:news@terrainformatica.com>>> wrote:
> 
>            In this case we shall define something like "rendering is
>         undefined"
>            for the case when transparent element has not in-flow children.
> 
> 
>         Making rendering "undefined" is unacceptable when there's a
>         perfectly reasonable alternative.
> 
>         You can try to write a spec for exactly what Opera does, but
>         you'll find it's significantly more complicated than just
>         creating a stacking context for the element with 'opacity'.
>         Which is why I would argue that Opera's behaviour is actually
>         *not* more natural.
> 
> 
>     Opera does simple thing for elements with opacity:
>     It renders only in-flow children on the offscreen buffer (layer).
> 
> 
> It's not that simple. Out-of-flow descendants are also affected in 
> Opera; they're rendered to their own buffers with the same opacity 
> value, and then the buffers are stacked. But of course an out-of-flow 
> descendant can have multiple ancestors with opacity, and it seems Opera 
> multiplies the opacity values up the ancestor chain ... or something 
> like that.
> 
> An interesting thing about this approach is that there's no way to take, 
> say, an absolutely-positioned container with abs-pos children, or a 
> block formatting context with float children, and render the whole thing 
> including all its descendants with group opacity. So when you apply 
> opacity to a BFC with a lot of normal content and a few floats, it's 
> going to look bad.
> 
> Anyway, Anne (Opera) already mentioned that they consider this a bug and 
> will change their behaviour to match what Gecko and Webkit do, so I 
> don't know why we're still discussing it.
> 

Opera behaves as if children inherit opacity value. And that is the bug.
Other than that its rendering near the perfect.

In any case for current implementations in FF and WK to be practically 
useful opacity attribute definition should be changed to:

opacity: <decimal> | 'inherit' | 'opaque';

with default value: 'opaque'.

Only in this case you can say that elements with values of opacity
computed to <decimal> establish new stacking context.
Otherwise that requirement of new stacking context is just a "dirty hack".

-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Thursday, 10 July 2008 04:49:42 GMT

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