Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

rem-calc() function not working as expected #343

Closed
designchief opened this issue Dec 18, 2014 · 5 comments
Closed

rem-calc() function not working as expected #343

designchief opened this issue Dec 18, 2014 · 5 comments
Assignees

Comments

@designchief
Copy link

The rem-calc() function does not sem to be working for me, can anyone confirm this?
eg.
SCSS Setting:
$h1-font-size: rem-calc(40);
CSS Output:
h1 { font-size: rem-calc(40)-0.625rem; }

The error doesn’t happen on the default settings,
only when I uncomment a setting to change the rem-calc() value

In case this might help,
I had been having major issues installing npm and had to use sudo on the main foundation installer, I have lost a huge amount of time installing foundation for apps via the Terminal on osx (thats a side note)

I also created a new app, manually installed npm to the app directory,
and the foundation-apps watch command is working now,
but the rem-calc() function is not working, does anyone know if this might be related to the install issues?

thanks, Kieran.

@designchief
Copy link
Author

Here is an example of the error I get when I try to change the breakpoints in the settings file:

[01:15:02] Starting 'sass'...
[01:15:04] gulp-ruby-sass: directory
{ [Error: error /Users/kieran/../AI-App-Beta-01/bower_components/foundation-apps/scss/helpers/_breakpoints.scss (Line 79: $number: "rem-calc(440)" is not a number for unit')] message: 'error /Users/kieran/../AI-App-Beta-01/bower_components/foundation-apps/scss/helpers/_breakpoints.scss (Line 79: $number: "rem-calc(440)" is not a number forunit')',
showStack: false,
showProperties: true,
plugin: 'gulp-ruby-sass',
__safety: { toString: [Function] } }
[01:15:04] Finished 'sass' after 2.13 s

@designchief
Copy link
Author

When I just use pixel units, everything works as expected

$breakpoints: (
small: 0,
medium: 440,
large: 640,
xlarge: 800,
xxlarge: 1200,
);

@gakimball
Copy link
Contributor

Ah, the functions aren't yet imported when the settings file is being processed. We'll put in a fix, but you can work around it for now by importing the functions file before your settings file:

@import "helpers/functions";
@import "settings";
@import "foundation";

@designchief
Copy link
Author

Thanks, this is working fine for me now

@gakimball
Copy link
Contributor

This commit fixes the issue: 339f164

myabc referenced this issue in opf/openproject Jan 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants