Re: [csswg-drafts] [css-transforms-2] transform-style: flat should not create stacking context, and 3D context grouping (#1950)

> Gecko's implementation (along with the TR and blink, I believe) is that transform-style:preserve-3d changes both 1 and 2 to the 3d variant, and transform-style:flat (default, explicitly set, or overridden by a flattening property) has both 1 and 2 as the flattened variant.

IIRC from the breakout session on this back in February 2019, this was one of the main issues. Let's try to resolve this one way or another this week at TPAC.

In the discussion in 2017 TPAC, it was stated that the ED/WebKit behavior is preferred, according to the notes here:

https://docs.google.com/document/d/1FIQW9qVPbZxn0pifFOXWWK0-7fXrjlSeYeZN7wHmIHo/edit#bookmark=id.gur0op2192ar

Arguments in favor of Firefox behavior:
* If the a transformed element is not flattened immediately, then its DOM parent must be a stacking context and containing block for descendants. This avoids all possible cases of flattening occurring without those properties present (example: https://codepen.io/chrishtr/pen/VwZBWvQ).
* All transformed elements in a 3D scene are containing blocks and stacking contexts. This also avoids any weird things happening.
* Easy to implement because of DOM locality
* Treats the root element of a stacking context the same as its constituent elements. For example, in the WebKit behavior, transformed children sort with each other, but not with a flat parent if the parent has a transform.

Arguments in favor of the WebKit behavior:
* Convenient for developers: allows children to sort relative to each other without extra grouping DOM nodes w/preserve-3d on them.
* Others?



-- 
GitHub Notification of comment by chrishtr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1950#issuecomment-531550005 using your GitHub account

Received on Sunday, 15 September 2019 09:28:46 UTC