I had to downgrade to gulp-sass 3.0.0. It's bug in libsass https://github.com/sass/libsass/issues/2309. So it should solve this by upgrading libsass and node sass to the latest version.
Closed by #666
Still getting this on 3.2.0
Error in plugin 'sass'
Message:
file.scss
Error: Undefined operation: "3 times 0.375em".
on line 18 of file.scss
from line 15 of other-file.scss
>> padding-left: 3 * $s-units--base-spacing;
----------------^
Works on 2.3.2
Same here:
Error: Undefined operation: "2 times 1sqrt(5)/2".Error: Undefined operation: "2 times 1sqrt(5)/2".
Please provide actual sass code that produces this error so we that we can
reproduce it locally
On Fri., 23 Mar. 2018, 12:30 am JanikWeb, notifications@github.com wrote:
Same here:
Error: Undefined operation: "2 times 1sqrt(5)/2".Error: Undefined
operation: "2 times 1sqrt(5)/2".—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/dlmanning/gulp-sass/issues/611#issuecomment-375305824,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWICXNyNxXBVWdoPzv8Cmqo1ZyPiYks5tg6dZgaJpZM4N64SJ
.
@JanikWeb are you using interpolation? Found out that arithmetic doesn't work against interpolated strings.
@sovanyio does that mean you can't do something like this:
$font-size-base: rems(18) !default; // Assumes the browser default, typically 16px /////////
$font-size-lg: $font-size-base * 1.25 !default;
cause I get the same error: Undefined operation: 'rems(18) times 1.25'
using [email protected]
From what I've discovered, it depends on what rems() does, and how it does it.
If it returns: #{calculated-rem}rem;, (which I've seen in some solutions), then further calculations are not possible, because the returned value is seen by the compiler as being a string (which you can't do math on).
If it returns: ($size-px / 16px) * 1rem;, then further calculations are possible because the returned value is a calculable number.
From what I've discovered, it depends on what
rems()does, and how it does it.
If it returns:#{calculated-rem}rem;, (which I've seen in some solutions), then further calculations are not possible, because the returned value is seen by the compiler as being a string (which you can't do math on).
If it returns:($size-px / 16px) * 1rem;, then further calculations are possible because the returned value is a calculable number.
Thank you very much, this was the solution that I needed! @cartbeforehorse
Most helpful comment
From what I've discovered, it depends on what
rems()does, and how it does it.If it returns:
#{calculated-rem}rem;, (which I've seen in some solutions), then further calculations are not possible, because the returned value is seen by the compiler as being a string (which you can't do math on).If it returns:
($size-px / 16px) * 1rem;, then further calculations are possible because the returned value is a calculable number.