Menu icon Foundation
Foundation CLI - not using latest files?

I'm new to Foundation and CSS frameworks and started first Sass project yesterday. Git/Ruby/NodeJS were all up to date and installation of Foundation CLI and creating a new project wasn't a problem.

I thought I'd start by hacking on _settings.scss with the default index.html to get a feel for using Sass with Foundation but I kept getting "Undefined variable" compilation errors whenever I uncommented anything in _settings.scss to override any default styling.

I posted a question on Stack Overflow yesterday - http://stackoverflow.com/questions/24293372/undefined-variable-compilation-errors-in-foundation-5-sass-project

It appears that my version of _settings.scss didn't have global variables declared in it. I had thought that these would be pulled in from the _global.scss partial but this wasn't the case.

Pulling the latest version of _settings.scss from Github has sorted it out (although a few trailing semicolons were missing, which caused compilation errors - easily fixed). The globals for things like $font-weight-normal are now in there on line 44.

What's the best workflow for creating a new Project? The CLI wasn't using the latest files - is it best to always manually update them after a foundation new.... ?

cli

I'm new to Foundation and CSS frameworks and started first Sass project yesterday. Git/Ruby/NodeJS were all up to date and installation of Foundation CLI and creating a new project wasn't a problem.

I thought I'd start by hacking on _settings.scss with the default index.html to get a feel for using Sass with Foundation but I kept getting "Undefined variable" compilation errors whenever I uncommented anything in _settings.scss to override any default styling.

I posted a question on Stack Overflow yesterday - http://stackoverflow.com/questions/24293372/undefined-variable-compilation-errors-in-foundation-5-sass-project

It appears that my version of _settings.scss didn't have global variables declared in it. I had thought that these would be pulled in from the _global.scss partial but this wasn't the case.

Pulling the latest version of _settings.scss from Github has sorted it out (although a few trailing semicolons were missing, which caused compilation errors - easily fixed). The globals for things like $font-weight-normal are now in there on line 44.

What's the best workflow for creating a new Project? The CLI wasn't using the latest files - is it best to always manually update them after a foundation new.... ?

Rafi Benkual almost 5 years ago

In your bower.json file, what version does it say it is there?

{
"name": "foundation-compass-app",
"version": "0.0.1",
"private": "true",
"dependencies": {
"foundation": "zurb/bower-foundation"
}
}

Should say "foundation": "zurb/bower-foundation"

James Foxlee almost 5 years ago

Hi Rafi, my bower.json file is the same as yours. As a sanity check, I've just created new project using the CLI - I also ran foundation update and bower update just to see if that pulled the latest on GitHub.

Here is what I have in my _settings.scss: (line 41)

// Global

// We use these to control various global styles
// $body-bg: #fff;
// $body-font-color: #222;
// $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
// $body-font-weight: $font-weight-normal;
// $body-font-style: normal;

Whereas the latest _settings.scss on GitHub has: (line 41)

// Global

// We use these to define default font weights
// $font-weight-normal: normal !default
// $font-weight-bold: bold !default

// We use these to control various global styles
// $body-bg: #fff;
// $body-font-color: #222;
// $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
// $body-font-weight: $font-weight-normal;
// $body-font-style: normal;

You can see that the latest GitHub version has the globals, the fact that these were missing was the source of the compile errors. There are other differences between what Foundation CLI downloaded and the version on GitHub, the above is not the only difference.

Should I steer clear of using the CLI if it isn't using the latest files?