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

Decimal litterals are truncated #5

Closed
npiguet opened this issue Mar 9, 2015 · 3 comments
Closed

Decimal litterals are truncated #5

npiguet opened this issue Mar 9, 2015 · 3 comments

Comments

@npiguet
Copy link
Contributor

npiguet commented Mar 9, 2015

I've encountered a strange behavior while using this plugin. For some reason all decimal litterals in my .scss file are truncated.

Here is an example of .scss code that causes the problem for me:

.sqw-contextMenu {
    li {
        a {
            padding: 0 0.8em 0 0.8em;
        }
    }
}

The code that is generated is the following:

sqw-contextMenu li a {
    padding: 0 0em 0 0em;
}

This happens with version 0.1.1 of libsass-maven-plugin on Ubuntu 14.04.

This issue was previously reported to libsass issue 923, but was closed as "cannot reproduce"

@npiguet
Copy link
Contributor Author

npiguet commented Mar 9, 2015

Here's a little more information: It seems that all decimal litterals are parsed truncated, even in fractions. For example:

.something {
  margin: (4.5/9);
}

is compiled to

.something {
  margin:0.44444 }

when the value of the margin should clealy be 0.5, and not 0.4444 (Which by the way is equal to 4/9, so the 4.5 value was truncated to 4, and then the fraction was calculated based on the truncated number.)

@npiguet
Copy link
Contributor Author

npiguet commented Mar 9, 2015

The issue is actually a bug in libsass that only appears in locales for which the decimal separator is not .

@warmuuh
Copy link
Owner

warmuuh commented Mar 9, 2015

glad to hear that :)

@warmuuh warmuuh closed this as completed Mar 9, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants