Skip to content

PrettyDiff Beautify CSS/SCSS: 0ms is converted to 0 (unitless). #463

@cborchert

Description

@cborchert

0 values in CSS can only be unitless for length values, not for time.

Note that this seems only to happen with ms values that are not followed by a comma. Additionally 0s retains its unit.

The following example should illustrate the point:

.test {
  transition: opacity 600ms linear 0ms, left 0ms linear 600ms, top 0s linear 0ms; 
}

Beautified with prettydiff becomes:

.test {
    transition: opacity 600ms linear 0ms, left 0 linear 600ms, top 0s linear 0;
}

Expected output:

.test {
    transition: opacity 600ms linear 0ms, left 0ms linear 600ms, top 0s linear 0ms;
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions