Re: [css3] About opacity

On Aug 17, 2010, at 9:46 AM, Brad Kemper wrote:

> On Aug 17, 2010, at 9:40 AM, Simon Fraser wrote:
> 
>> Children cannot be less opaque than their parents because of the way that opacity is rendered. The element with opacity and all its descendants are rendered into a bitmap first, and that bitmap is then painted with the specified opacity value. This approach is necessary, because otherwise overlapping children would have a different appearance. This is also the reason why opacity < 1 creates stacking context.
>> 
> 
> Right, but couldn't there be a new property or new component value that would allow that child and of of its children to form a new separate stacking context and separate bitmap that was rendered above the parent, without the parent's opacity affecting it? Or does that cause horrible performance with "look ahead" problems?

You can't pop the child out into its own stacking context that is not contained within the parent stacking context; if you do that, you're effectively treating it as a sibling of the container, which is a logical inconsistency. So, no, I don't see a way around this problem, other than allowing other properties to control how much alpha things have (namely RGBA colors, image filters etc).

Simon

Received on Tuesday, 17 August 2010 20:39:17 UTC