-
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
Dynamic division with interpolation not compatible with libsass #948
Comments
I can confirm that this bug exists on latest master. foo { bar: 10 * 5#{px}; } |
@xzyfer I gave it a try, but it is a bit more complicated than expected. Actually with my first approach it started to accept stuff like this (which I found quite neat, but is not what ruby sass does): 10f#{o}o + 20foo -> 30foo It also correctly complained when units where off for calculations. Not sure what the reasons are for ruby sass to not evaluate interpolated stuff into numbers again (there was actuall only one failing spec test with function |
I'm not surprised this is difficult. My initial impression was that this is related to #442. |
Because I believe Sass designers do not want units to be thought as a random string living at the end of a number. While there seem to be an issue with LibSass on this case, the initial problem could be solved by correctly using numbers with units, rather than dealing with strings all along. |
This fix was a false positive due to sass/sass-spec#380. The spec still fails. |
We now have a passing spec test since #1249 was merged 🎈 |
Found this problem with playing with node-sass the other day with this code snippet:
This test with Sass 3.2.19 and above
yields
Testing with the current libsass master I get
"invalid operands for multiplication"
.The text was updated successfully, but these errors were encountered: