W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2021

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

From: L. David Baron via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Jul 2021 22:15:40 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-939304013-1625696138-sysbot+gh@w3.org>
dbaron has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-transforms-2] transform-style: preserve-3d should only have effects on transformable elements ==
As discussed in #1950 and as changed in #3750, css-transforms-2 currently [says](https://drafts.csswg.org/css-transforms-2/#transform-style-property):

> 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](https://drafts.csswg.org/css-transforms-1/#transformable-element), which are what [`transform-style`'s Applies to line](https://drafts.csswg.org/css-transforms-2/#propdef-transform-style) 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](https://drafts.csswg.org/css-cascade-3/#used).

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`](https://drafts.fxtf.org/filter-effects/#FilterProperty) and [`backdrop-filter`](https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty)).

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](https://drafts.csswg.org/css-transforms-1/#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](https://drafts.csswg.org/css-transforms-2/#grouping-property-values) not be considered in determining whether to establish a containing block or stacking context.

cc @mattwoodrow @smfr 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6430 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 7 July 2021 22:16:44 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:39 UTC