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

px/em unit calculations outputting incorrect units. #783

Closed
browniefed opened this issue Dec 27, 2014 · 3 comments · Fixed by #797
Closed

px/em unit calculations outputting incorrect units. #783

browniefed opened this issue Dec 27, 2014 · 3 comments · Fixed by #797

Comments

@browniefed
Copy link

From sass/node-sass#585

A few compass translations to raw scss have a hide-text mixin

    $approximate-em-value: 12px / 1em;
    $wider-than-any-screen: -9999em;
    text-indent: $wider-than-any-screen * $approximate-em-value;  

In node-sass 1.2.2 (unsure of libsass version at that time) the calculation would return just the px unit like -119988px however in 2.0 beta the result is -119988em*px/em

sass/sass-spec#212

@KittyGiraudel
Copy link

I am not sure 12px / 1em should be valid anyway. em unit is context-dependant. Did I miss something?

@browniefed
Copy link
Author

@hugogiraudel sorry this was pulled from compass mixins, compass/typography/text/_replacement.scss in particular. I was under the impression that because the calculation (outputting just the px amount) worked in previous libsass versions that it may be a regression.
The raw sass solution is to strip away all units and then just multiply by -1px, so if this is intended then no big deal.

@xzyfer
Copy link
Contributor

xzyfer commented Jan 1, 2015

This is fixed and will be available in the first patch release of 3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants