Skip to content

v3.1.5 makes decimal fractions unitless #394

Closed
@87carats

Description

@87carats

When both leading-zero and unitless-zero options are set true,

$ csscomb --version
3.1.5

$ cat ./.csscomb.json
{
  "leading-zero": true,
  "unitless-zero": true
}

csscomb removes unit of decimal values less than 1.

$ cat ./example.css
.example {
  bottom: 0em;
  left:   0.5em;
  right:  1em;
  top:    1.5em;
}

$ csscomb --config ./.csscomb.json ./example.css

$ cat ./example.css
.example {
  bottom: 0;
  left:   0.5;
  right:  1em;
  top:    1.5em;
}

Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions