Re: [css-3d-transforms] Opacity and perspective handling

Sorry for not replying sooner; this got list in my queue before vacation.

On Nov 14, 2011, at 7:58 PM, Matt Woodrow wrote:

> The spec for the perspective property [1] states that it ' applies only to the positioned or transformed children of the element'. Is 'children' meant to mean 'descendants' here?
> 
> In this test case [2], WebKit is applying perspective to the transform, even though the transformed frame isn't a direct child of the frame with perspective. Is this expected behaviour, or a bug?

This is an area where the spec is extremely vague, and the WebKit implementation is buggy, alas (the current behavior falls out of details of the implementation).

I'm actually not sure how to specify how far "down" perspective has its influence. I used to think that using direct descendants is too restrictive and that it might be better to specify it in terms of containing block or stacking context, somehow, but now am going more towards just saying direct descendants, for simplicity.

> Also, is preserve-3d meant to change the definition of opacity? 
> 
> In this example test case [3], opacity is applied to the parent element of a preserve-3d hierarchy. WebKit is rendering each of the children with opacity separately, such that you can see the other elements through them. In firefox all the elements are rendered with solid color and flattened into a buffer before having opacity applied, as (I believe) is expected for group opacity.

I think Firefox's behavior is correct here. WebKit isn't doing group opacity correctly in this case.

Simon

> 
> - Matt
> 
> [1] http://dev.w3.org/csswg/css3-3d-transforms/#perspective
> [2] https://bug702375.bugzilla.mozilla.org/attachment.cgi?id=574475
> [3] http://ikilote.net/Programmation/CSS/Test/transform-style.htm
> 
> 

Received on Tuesday, 29 November 2011 00:33:05 UTC