[css-transforms-2] transform-style: preserve-3d should only have effects on transformable elements · Issue #6430 · w3c/csswg-drafts · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-transforms-2] transform-style: preserve-3d should only have effects on transformable elements #6430

Closed
dbaron opened this issue Jul 7, 2021 · 2 comments

Comments

@dbaron
Copy link
Member

dbaron commented Jul 7, 2021

As discussed in #1950 and as changed in #3750, css-transforms-2 currently says:

A computed value of preserve-3d for transform-style establishes both a stacking context and a containing block for all descendants.

I tend to think this should only happen for transformable elements, which are what transform-style's Applies to line says it applies to. It's worth noting that the "Applies To" line isn't really defined to do anything other than cause the property not to have a used value.

However, I think the intent of this "Applies to" line is that the property only have effects on transformable elements -- i.e., that it shouldn't have effects on non-replaced inlines. In particular, the effect here would be only the third place in CSS where non-replaced inlines could be a containing block for fixed-positioned elements (the other two being filter and backdrop-filter).

So I'd propose changing the wording of the above sentence to instead say:

A computed value of preserve-3d for transform-style on a transformable element establishes both a stacking context and a containing block for all descendants.

I think this still fits with the original intent of the wording which is that the effects of grouping properties not be considered in determining whether to establish a containing block or stacking context.

cc @mattwoodrow @smfr

@dbaron
Copy link
Member Author

dbaron commented Jul 8, 2021

And based on code inspection, this appears to match what Gecko does.

(I'd like to change Chrome to do the same, because then I won't have to worry about how to fix some assertion failures.)

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 8, 2021
Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 8, 2021
Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jul 8, 2021
Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}
pull bot pushed a commit to Yannic/chromium that referenced this issue Jul 9, 2021
Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 18, 2021
…l be no-op on inlines., a=testonly

Automatic update from web-platform-tests
[TransformInterop] Make preserve-3d still be no-op on inlines.

Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}

--

wpt-commits: 3373bcff73e290f95342a9b71c5a967bf47da582
wpt-pr: 29605
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Jul 20, 2021
…l be no-op on inlines., a=testonly

Automatic update from web-platform-tests
[TransformInterop] Make preserve-3d still be no-op on inlines.

Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}

--

wpt-commits: 3373bcff73e290f95342a9b71c5a967bf47da582
wpt-pr: 29605
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Jul 20, 2021
…l be no-op on inlines., a=testonly

Automatic update from web-platform-tests
[TransformInterop] Make preserve-3d still be no-op on inlines.

Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}

--

wpt-commits: 3373bcff73e290f95342a9b71c5a967bf47da582
wpt-pr: 29605
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Jul 21, 2021
…l be no-op on inlines., a=testonly

Automatic update from web-platform-tests
[TransformInterop] Make preserve-3d still be no-op on inlines.

Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}

--

wpt-commits: 3373bcff73e290f95342a9b71c5a967bf47da582
wpt-pr: 29605
@mattwoodrow
Copy link
Contributor

Sorry for the slow response. I agree that your proposed wording better reflects the intent, and makes things easier to understand and implement.

@dbaron dbaron closed this as completed in 217feeb Oct 5, 2021
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this issue Oct 14, 2022
Make transform-style: preserve-3d still be a no-op on non-replaced
inline elements rather than making it force a stacking context and a
containing block.

This matches Gecko's behavior, and I think the intent of the spec change
that this is implementing.  The proposal to change the spec to match is
in w3c/csswg-drafts#6430 .

This change also means we can avoid worrying about fixing the DCHECK()
failures triggered by having an additional way of making non-replaced
inlines be a containing block for fixed-positioned elements.

Fixed: 1226287
Change-Id: Ifeb472de072355001d71f37f3e6bf7c71d085154
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011457
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#899617}
NOKEYCHECK=True
GitOrigin-RevId: 9d51c5532577eda285ff3621dc8ac2c6d4df274e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants