Skip to content

[css-transforms-2] transform-style initial value #3138

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

Open
ewilligers opened this issue Sep 24, 2018 · 1 comment
Open

[css-transforms-2] transform-style initial value #3138

ewilligers opened this issue Sep 24, 2018 · 1 comment

Comments

@ewilligers
Copy link
Contributor

There is a discrepancy between spec and implementations.

https://drafts.csswg.org/css-transforms-2/#transform-style-property

Value: auto | flat | preserve-3d
Initial: auto

A value of "flat" for transform-style establishes a stacking context, and establishes a 3D rendering context.

Chrome, Edge, Firefox and Safari support flat and preserve-3d, but not auto; they have initial value flat. I suspect they do not establish a stacking context and 3D rendering context whenever transform-style is flat.

@fantasai fantasai changed the title transform-style initial value [css-transforms-2] transform-style initial value Sep 24, 2018
@tabatkins
Copy link
Member

Sigh, this property has never been described in a sensical way. It used to be just "flat" and "preserve-3d", with an initial value of "flat". The implication was that all elements flatten by default, and you need to set preserve-3d on all elements that want to interact in the 3d rendering context.

But Safari didn't do that, they had some additional special rules that caused descendants to stay in the 3d rendering context unless you said "flat". There was no indication of how that was achieved, but the only way we could figure out how to explain it was with a third "auto" value, which the spec now reflects.

I've been forever confused about this whole topic, and would welcome light shed on it from someone who understands the implementations.

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