modularscale / modularscale-sass

Modular scale calculator built into your Sass

Home Page:http://www.modularscale.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Power undefined operation error

mattgregg opened this issue · comments

commented

I had been using the mixin successfully while developing for a project and for some reason it started to throw me this error. I have been researching online and have tried a number of tweaks (order of includes, adding sassy_math) to no avail so I thought I'd check if someone had seen this before and knows the fix.
Syntax error: Undefined operation: "power(golden_ratio(), 1) times 16px 160px".
on line 52 of C:/Users/greggm/Dropbox/htdocs/webdemo1/JAT/JATArticle/v4_5/sass/vendor/_modular-scale.scss

thx.

commented

I restarted the project from ground up installing the gem this time for this and for sassy-math instead of just importing the file. This seems fine. I'm not sure how the earlier project got out of wack. Closing this.

@mattgregg A lot of the code for modular-scale is written as a Ruby extension to Sass. That is why you need to install the gem instead of just copying files over.

Glad you got it working.

I have the same issue, I started new project from scratch, still the same issue. I have gem installed, I don't know how you fixed this, the error I get is:

Syntax error: Undefined operation: "Infinity times 16px 78px".
on line 52 of /home/rajib/.rvm/gems/ruby-1.9.3-p392/gems/modular-scale-1.0.6/stylesheets/_modular-scale.scss

The sass code I am calling from is:

$ratio: perfect-fourth();
$base-font-size: 16px !default;
$importantNum: 78px !default;
$base-size: $base-font-size $importantNum;

Just tested with golden() and this error doesn't show... I guess this is some issue with perfect-four(), or others.

$ratio: golden();
$base-font-size: 16px !default;
$importantNum: 78px !default;
$base-size: $base-font-size $importantNum;

works perfectly fine.