Skip to content

[minify] Do not convert rotate: 0deg to rotate: none #1136

@yisibl

Description

@yisibl

The specification clearly states that rotate: 0deg creates a stacking context and containing block, while rotate: none does not.

See Demo: https://codepen.io/yisi/pen/QwEJEmr?editors=0100
image

All three properties accept (and default to) the value none, which produces no transform at all. In particular, this value does not trigger the creation of a stacking context or containing block for all descendants, while all other values (including “identity” transforms like translate: 0px) create a stacking context and containing block for all descendants, per usual for transforms.
https://drafts.csswg.org/css-transforms-2/#valdef-translate-none

input

.foo {
    rotate: 0deg;
}

output

.foo{rotate:none}

expected

.foo{rotate:0deg}

Note: The unit “deg” cannot be omitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions