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

Scientific notation should be supported for numbers/percentages/dimensions #2465

Closed
ThomasBrierley opened this issue Aug 9, 2017 · 2 comments

Comments

@ThomasBrierley
Copy link

ThomasBrierley commented Aug 9, 2017

Input

foo {
  a: 1e1px;
  b: 1e-1px;
}

LibSass 3.5.0-beta.2

Error: Incompatible units: 'px' and 'e'.
        on line 3 of test.scss
>>   b: 1e-1px;

Sass 3.5.1 (Bleeding Edge)

foo {
  a: 1e1px;
  b: 1e-1px; }

Version info

$ node-sass --version
node-sass       4.5.3   (Wrapper)       [JavaScript]
libsass         3.5.0.beta.2    (Sass Compiler) [C/C++]

Spec sass/sass-spec#1163

@ThomasBrierley ThomasBrierley changed the title E-Notation: negative exponents cause unit parsing error. E-Notation: exponent sign parsed as operator. Aug 9, 2017
@nschonni nschonni changed the title E-Notation: exponent sign parsed as operator. Scientific notation should be supported for numbers/percentages/dimensions Aug 9, 2017
@nschonni
Copy link
Collaborator

nschonni commented Aug 9, 2017

https://www.w3.org/TR/2014/CR-css-syntax-3-20140220/

Ruby Sass outpust both correctly in 3.5 and 4.0, but libsass has trouble with the negative version only
https://www.sassmeister.com/gist/bd4d877039b787fa24e35470eaa9c120

@xzyfer
Copy link
Contributor

xzyfer commented Aug 17, 2017

Thanks for confirming this issue @nschonni. I've added the spec.

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

4 participants