Re: [css3-2d-transforms] Transformed object acts as containing block for fixed positioned descendants

On Oct 12, 2010, at 3:18 PM, Sylvain Galineau wrote:

> In the introduction, it is said that:
> 
>   # Any value other than 'none' for the transform results in the creation of both 
>   # a stacking context and a containing block. The object acts as a containing block 
>   # for fixed positioned descendants.
> 
> I think we did agree earlier that this kind of normative statement should not be just intro material. 
> But I was more curious as to the intended meaning of the latter statement ? First the spec says
> the transform creates a stacking context and containing block. What's the extra bit about fixed positioned
> descendants for ?

Imagine:

<div style="transform: rotate(45deg)">
  <div style="positon: fixed"></div>
</div>

When you scroll, what happens to the fixed position div?

What this last sentence is saying is that the fixed position div is no longer positioned relative to the viewport,
but relative to its transformed ancestor. Anything else would be very hard to implement, and to specify.

Simon

Received on Tuesday, 12 October 2010 23:40:57 UTC