foundation / foundation-sites

The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
https://get.foundation
MIT License
29.66k stars 5.48k forks source link

Undefined operation: "golden-ratio() times 14px 44px". #1471

Closed shri closed 11 years ago

shri commented 11 years ago

Hi,

I'm trying to setup Foundation on Windows 8 with Scout (so not able to install gems).

I've run into the Undefined operation: "golden-ratio() times 14px 44px". error and I believe it's because I don't have a .scss file that's overriding the "times" function, but I'm not sure. Here are my import statements from foundation.scss:

@import "compass/css3";

@import "foundation/functions/modular-scale";

@import "foundation/functions/all";

@import "foundation/settings";

@import "foundation/mixins/all";

@import "foundation/common/base";

@import "foundation/components/grid", "foundation/components/modules/all";

// Media Queries Overrides @import "foundation/components/modules/mqueries";

I have the latest build and I'm using the latest modular-scale and the latest sassy-math aka _math.scss. Thanks for the help!

Shri

hatefulcrawdad commented 11 years ago

Scout has trouble compiling Foundation because it doesn't include modular-scale, etc. We'll look into this more after we release 4.0

Fequois commented 11 years ago

A very similar error occurs when Foundation is installed as a gem:

'Line 52 of _modular-scale.scss: Undefined operation: "0 times 14px 44px".'

I'm not sure whether I'm doing something wrong (I'm not all that familiar with neither Compass or Ruby in general) or if it's a bug.

It occurs when trying to change the font size scale in the Settings file. In particular, uncommenting the ratio causes it. While commented, there's no compilation error, but on the other hand, the font sizes remain the same no matter what.

CristinaSolana commented 11 years ago

I just went ahead and removed $golden and added the actual golden ration value in it's place: 1.61803398875 and all is good.

Zignature commented 11 years ago

Hello CristinaSolana,

Where did you remove $golden and added the golden ratio value? I'm having the same issues and I can't seem to fix it...

Fequois commented 11 years ago

Zignature,

It's in '_settings.scss' if you're on Foundation 3. Just replace the $golden variable with a ratio value of your own.

Zignature commented 11 years ago

Excellent! Thank you so much :D

On Fri, Apr 5, 2013 at 2:41 PM, Fequois notifications@github.com wrote:

Zignature,

It's in '_settings.scss' if you're on Foundation 3. Just replace the $golden variable with a ratio value of your own.

— Reply to this email directly or view it on GitHubhttps://github.com/zurb/foundation/issues/1471#issuecomment-15953378 .

Fequois commented 11 years ago

You're most welcome. I hope it works for you. :smile:

Zignature commented 11 years ago

Now I get this:

error foundation.scss (Line 155 of _modular-scale.scss: Undefined operation: "1.61803 times sort_list(14px 44px)".)

:(

On Fri, Apr 5, 2013 at 2:46 PM, Fequois notifications@github.com wrote:

You're most welcome. I hope it works for you. [image: :smile:]

— Reply to this email directly or view it on GitHubhttps://github.com/zurb/foundation/issues/1471#issuecomment-15953614 .

Zignature commented 11 years ago

These are the lines that are being referred to:

Line 154: @for $i from 1 through $multiple { Line 155: $modular-scale: power($ratio, $i) * nth($base-size, $k); Line 156: $scale-values: append($scale-values, $modular-scale); Line 157: }

Any help would be greatly appreciated.

Regards, Siegert

On Fri, Apr 5, 2013 at 2:51 PM, Siegert siegert.naber@gmail.com wrote:

Now I get this:

error foundation.scss (Line 155 of _modular-scale.scss: Undefined operation: "1.61803 times sort_list(14px 44px)".)

:(

On Fri, Apr 5, 2013 at 2:46 PM, Fequois notifications@github.com wrote:

You're most welcome. I hope it works for you. [image: :smile:]

— Reply to this email directly or view it on GitHubhttps://github.com/zurb/foundation/issues/1471#issuecomment-15953614 .

Fequois commented 11 years ago

I can't say for sure, and I don't have a copy of Foundation 3 to check with, but it sounds like you've either entered an incorrect value or something in your modular-scale file is wonky. What value did you enter?

Zignature commented 11 years ago

I changed this: // $ratio: $golden; // THIS IS DEFAULT IN MODULAR-SCALE

to this: $ratio: 1.61803398875; // THIS IS DEFAULT IN MODULAR-SCALE

On Fri, Apr 5, 2013 at 2:56 PM, Fequois notifications@github.com wrote:

I can't say for sure, and I don't have a copy of Foundation 3 to check with, but it sounds like you've either entered an incorrect value or something in your modular-scale file is wonky. What value did you enter?

— Reply to this email directly or view it on GitHubhttps://github.com/zurb/foundation/issues/1471#issuecomment-15954044 .

Fequois commented 11 years ago

Have you tried with a less complex value? Just to verify that it isn't Compass that can't deal with it. You can use this site to calculate scales: http://modularscale.com

(As I mentioned above, I'm not too familiar with SASS+Compass.)

Edit: Actually, you can find the full list of scales used in Foundation somewhere. I can't remember exactly in which file, but if you find it, you can cross-check for compatibility.

Zignature commented 11 years ago

I tried 1.61803 to no avail :(

I'm searching for the full list of scales now.

Fequois commented 11 years ago

How about 1.618?

If that doesn't work, I'm afraid you'll have to keep troubleshooting or wait and see if a kind soul from Zurb can get you up and running.

noslouch commented 11 years ago

Maybe it's a units issue? Try adding px to your ratio or removing px from where it's pulling the values for the sort-list function

On Friday, April 5, 2013, Fequois wrote:

How about 1.618?

If that doesn't work, I'm afraid you'll have to keep troubleshooting or wait and see if a kind soul from Zurb can get you up and running.

— Reply to this email directly or view it on GitHubhttps://github.com/zurb/foundation/issues/1471#issuecomment-15955543 .

Brian Whitton brianwhitton.com bwhitton@gmail.com 646 369 8909 @noslouch noslouch.tumblr.com

Zignature commented 11 years ago

tried it all to no avail. I'll keep digging until I come up with a solution.

Thanks for all the help guys

Fequois commented 11 years ago

Either you must have done something wrong elsewhere or you've got a bad build of Foundation. Try to update to the last version of Foundation 3? Don't forget to backup first. :smile:

Zignature commented 11 years ago

I'm using Scout and it turns out Foundation doesn't work in Scout :( Opting for Compass.app now and see whether that will work.

Again thanks for all the effort people.

CristinaSolana commented 11 years ago

Hi, find: $golden in your _settings.scss and replace it with: 1.61803398875 is what I did. Let me look and see if there was anything else.

Fequois commented 11 years ago

The version of Foundation you're using is written with Compass in mind, so try it out and let's see if it works. :smiley:

Zignature commented 11 years ago

Scout is a (free) GUI for Compass but it doesn't work well for Foundation. Compass.app works just fine so it was well worth spending the $10 :)