ben-eb / perfectionist

Beautify CSS files.
MIT License
228 stars 14 forks source link

Trim or add leading zeroes? #75

Open keithjgrant opened 7 years ago

keithjgrant commented 7 years ago

How should we deal with leading zeros on decimal values? Trim them, add them, or leave as authored?

.foo {
  /* trim */
  padding: .2em;
}

.bar {
  /* add them */
  padding: 0.2em;
}

Poll on Twitter to get a feel for public opinion: https://twitter.com/ben_eb/status/862994803759382528

jeddy3 commented 7 years ago

We chose to enforce a leading zero in stylelint-config-standard because we believed it makes the code more quickly legible. We favour legibility over minimising key strokes.