-
Notifications
You must be signed in to change notification settings - Fork 464
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
Precision #287
Comments
You're correct; it's currently hard-coded. It should be relatively easy to make it configurable. |
I've raised an issue on Sass Ruby about raising the default, see: sass/sass#1122 |
I would make this a pretty high priority as it, as pointed out in the above mentioned issue, is kind of blocking big frameworks like Bootstrap from using libsass at the moment. Those projects are actively discouraging any SASS-compilation using a precision less than 10. |
Bumping this up, as it's actively causing issues for the Foundation framework. |
Why not just increase the precision value to 10? Would that raise any issues for any projects? Any performance decreases worth mentioning? |
@jmagnusson There's an active discussion in sass/sass#1122 about the default, as mentioned by @glebm. I don't think libsass will want to diverge from the other Sass implementations in its default value so until Sass itself changes its default the only alternative for libsass is likely to mirror the configurability of precision that already exists in other implementations, as was initially suggested here. |
All right, I've pushed a fix for this. The context struct now has a precision field that you can set; I've also added a |
Thanks @akhleung! I already implemented it for the Perl Module and basic test is working correct! |
Was fixed, but now it's regressed. :-( Addressed in the newer ticket #364. |
Sass defaults to 5 digits of precision when performing calculations. This clashes with popular css frameworks like Bootstrap and Foundation. There is ongoing, unresolved discussion as to what defaults to uphold sass/sass#1122. In the meantime, libsass has made this configurable, but defaults to Sass' values, i.e. sass/libsass#287 and sass/libsass#675 Common workarounds involve editing the precision value directly, i.e. https://github.com/twbs/bootstrap-sass/blame/master/README.md#L78 using the provided accessor http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method This commit simply makes sassc-rails pass along that default value from Sass proper.
Does libsass support precision? It appears to be hardcoded at 5 https://github.com/hcatlin/libsass/blob/7936f599cb702c0753af508e6ecf56debd382c57/inspect.cpp#L313
The text was updated successfully, but these errors were encountered: