You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Fractional numbers such as ".01" get displayed as "0.01" #550
A minor issue, but it differs from ruby-sass. Consider this test case:
#foo{d:.0001px;f:.01px;d:-.0001px;f:-.01px;}
The expected result after passing through sassc is the the identity. I actually got this instead:
#foo{d:0.0001px;f:0.01px;d:-0.0001px;f:-0.01px;}
According to CSS 3, 4.2. Numbers: the number type, a number is either an integer or zero or more integers followed by a dot, followed by one or more digits.
I noticed this as well recently while working on Libsass 3.0, but decided it wasn't worth the effort to solve because there is no functional difference. Also, as you pointed out, "a number is either an integer or zero or more integers followed by a dot, followed by one or more digits". The way I read it, this isn't necessarily wrong, just slightly different from how it was done in Ruby Sass. It would be good to solve but shouldn't cause any issues for users.
Activity
mgol commentedon Oct 17, 2014
Confirmed; in my app it's one of the remaining differences from the version compiled via Ruby Sass.
jschulte commentedon Oct 18, 2014
I noticed this as well recently while working on Libsass 3.0, but decided it wasn't worth the effort to solve because there is no functional difference. Also, as you pointed out, "a number is either an integer or zero or more integers followed by a dot, followed by one or more digits". The way I read it, this isn't necessarily wrong, just slightly different from how it was done in Ruby Sass. It would be good to solve but shouldn't cause any issues for users.
mgreter commentedon Oct 18, 2014
This nuance is found here, if anyone cares to fix it: b860361#diff-cfe40fe6863b6bef68e57af57bca1155L324
jschulte commentedon Oct 18, 2014
Ooh, there you go. I'll work on getting a pull request in to fix that. :)
mgreter commentedon Oct 18, 2014
PRs are always welcome :)
Lekensteyn commentedon Oct 18, 2014
Nice, I had no idea where to look for a possible fix. Thank you for picking it up!
xzyfer commentedon Oct 29, 2014
Spec added sass/sass-spec#105.
Merge pull request #624 from mgreter/issue/550