Skip to content
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

v3.1.5 makes decimal fractions unitless #394

Closed
87carats opened this issue Jun 7, 2015 · 1 comment
Closed

v3.1.5 makes decimal fractions unitless #394

87carats opened this issue Jun 7, 2015 · 1 comment

Comments

@87carats
Copy link

87carats commented Jun 7, 2015

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?

jdforrester added a commit to wikimedia/oojs-ui that referenced this issue Jun 8, 2015
This rounded CSS values less than 1 to 0, which is unhelpful.
See csscomb/csscomb.js#394 for upstream
report.

Bug: T101766
Change-Id: I21db02b16273f8e5fc4f6b126fd5777313dda850
@tonyganch
Copy link
Member

Fixed in [email protected].
Thank you for report!

haoqunjiang pushed a commit that referenced this issue Jan 18, 2016
Don't remove units from values starting from zero, like `0.5em`
haoqunjiang added a commit that referenced this issue Jan 18, 2016
tonyganch added a commit that referenced this issue Jul 11, 2016
Don't remove units from values starting from zero, like `0.5em`
tonyganch pushed a commit that referenced this issue Jul 11, 2016
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