Re: Additional value for the visibility property

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 UTC