Re: [csswg-drafts] [css-transform] 3D context penetration

The Working Group just discussed `https://github.com/w3c/csswg-drafts/issues/1944`.

<details><summary>The full IRC log of that discussion</summary>
&lt;chrishtr> topic:https://github.com/w3c/csswg-drafts/issues/1944<br>
&lt;chrishtr> Github:https://github.com/w3c/csswg-drafts/issues/1944<br>
&lt;chrishtr> trchen: how should overflow clip interact with 3d?<br>
&lt;chrishtr> trchen: ED spec requires overflow clips to force flattening and a stacking context<br>
&lt;chrishtr> trchen: making overflow clip a stacking context would break legacy content<br>
&lt;chrishtr> trchen: it seems most implementations flatten children of overflow clips but do not induce a stacking context<br>
&lt;chrishtr> dbaron: there was not an intent to make overflow clips a stacking context, does it have to?<br>
&lt;chrishtr> trchen: thought the reason was to avoid parallax<br>
&lt;chrishtr> trchen: but 3d content has a separate texture backing in Chrome/Safari anyway<br>
&lt;chrishtr> smfr: clipping has to happen in 2D if it's going to happen, so that means you have to flatten if you are going to apply it<br>
&lt;chrishtr> smfr: transform-style: flat currently forces a stacking context in the ED spec, maybe that has to change?<br>
&lt;chrishtr> trchen: grouping properties for a stacking context, there is no way to avoid that<br>
&lt;chrishtr> trchen: but overflow clip needs to force transform-style flat, but not be fully grouping<br>
&lt;chrishtr> trchen: next question: how should non-stacking overflow clip behave? in particular how does the flattened result stack against other elements in the containing stacking context?<br>
&lt;chrishtr> smfr: should lie on the z=0 plane<br>
&lt;chrishtr> trchen: how to sort against other z=0 children?<br>
&lt;chrishtr> smfr: do 3d children depth sort before flattening?<br>
&lt;chrishtr> trchen: mozilla, blink, edge follow TR generally, safari somewhere between TR and ED<br>
&lt;chrishtr> smfr: one use case of overflow scrolling + 3d is parallax<br>
&lt;chrishtr> smfr: if overflow other than visible forces non-stacking flattening, how are transform matrices accumulated? does it kill parallax?<br>
&lt;chrishtr> matt woodrow: does not kill parallax<br>
&lt;chrishtr> matt woodrow: edge forces a stacking context with overflow clip + transform-style: preserve-3d<br>
&lt;chrishtr> chrishtr: chrome also forces a stacking context in this case<br>
&lt;chrishtr> trchen: in edge overflow clip with transform-style preserve-3d behaves like a 3d context root, but still inherits non-3d matrices across it<br>
&lt;chrishtr> trchen: unsure what chromium does, we can implement edge behavior if needed<br>
&lt;dbaron> MaRakow: mwoodrow: fyi, backscroll for this channel is at https://log.csswg.org/irc.w3.org/fx/2017-11-07/<br>
&lt;chrishtr> trchen: maybe we should force flattening but sort children<br>
&lt;mwoodrow> thanks<br>
&lt;chrishtr> smfr: wouldn't that kill parallax?<br>
&lt;chrishtr> trchen: perspective on the overflow hidden element will still apply as expected for parallax<br>
&lt;chrishtr> smfr: agree that this should work<br>
&lt;chrishtr> trchen: adding perspective on the overflow clipping element will also cause it to be stacking, which is a nice property<br>
&lt;chrishtr> smfr: perspective is a way to apply an additional matrix to descendants<br>
&lt;chrishtr> smfr: perserve-3d is a way to define 3d rendering contexts of sets of elements/a space into which subtree elements will 3D sort<br>
&lt;chrishtr> smfr: convenient to think about hoisting the children up to the 3d rendering context root<br>
&lt;chrishtr> smfr: preseve-3d prevents flattening, you should not apply it to the root, should apply to intermediate elements between root and 3d descendants. perspective should be on the root<br>
&lt;chrishtr> (note: all this is info from smfr on the ED way of thinking)<br>
&lt;chrishtr> chrishtr: consensus seems to be that an overflow clipping element should be forced to transform-style flat but not a stacking context, and should allow pespective to be specified on itself<br>
&lt;chrishtr> trchen: still need to resolve z-index sorting<br>
&lt;MaRakow> q+<br>
&lt;chrishtr> smfr: comment about z-index above is not specific to overflow clip, it's a general thing<br>
&lt;chrishtr> marakow: is there a github issue?<br>
&lt;chrishtr> https://github.com/w3c/csswg-drafts/issues/1944<br>
&lt;chrishtr> chrishtr: the above link is for the explainer<br>
&lt;chrishtr> marakow: we need all these examples and testcases written down<br>
&lt;chrishtr> chrishtr: trchen will take this action item<br>
&lt;chrishtr> trchen: overflow clip is special for z-index because we need to do "premature" flattening<br>
&lt;chrishtr> smfr: ED currently says that transform-style: flat is a stacking context<br>
&lt;chrishtr> trchen: prefer to remove that clause from ED<br>
&lt;dbaron> The whiteboard drawings are: https://lists.w3.org/Archives/Public/www-archive/2017Nov/att-0006/IMG_20171107_115421.jpg<br>
&lt;Rossen> q?<br>
&lt;chrishtr> smfr: new issue to discuss: how is transform-style flat specified if changed? more generally, how does this affect how 3d contexts are defined?<br>
&lt;chrishtr> github:https://github.com/w3c/csswg-drafts/issues/1944<br>
&lt;RRSAgent> logging to https://www.w3.org/2017/11/07-fx-irc<br>
&lt;dbaron> [note there's a bit of backlog prior to the RRSAgent-recorded log that's on logs.csswg.org ]<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1944#issuecomment-342603888 using your GitHub account

Received on Tuesday, 7 November 2017 20:00:17 UTC