Menu icon Foundation
Sass 3.4.2 compilation problem

Hi,
Since I upgraded my sass to 3.4.2, under linux via gem, my foundation compilation is incomplete. No error message, but the css file result doesn't contain all components.

I've read the changelog http://sass-lang.com/documentation/file.SASS_CHANGELOG.html but unsuccessful.

Has anyone had the same problem ?

Any help appreciated. Thanks

Sassscss

Hi,
Since I upgraded my sass to 3.4.2, under linux via gem, my foundation compilation is incomplete. No error message, but the css file result doesn't contain all components.

I've read the changelog http://sass-lang.com/documentation/file.SASS_CHANGELOG.html but unsuccessful.

Has anyone had the same problem ?

Any help appreciated. Thanks

Stephen Earle over 2 years ago

I've just had a similar problem after installing SASS for the first time - installed successfully and created my first project but sadly the css doesn't display at all.

Interestingly there's a similar issue if you just download the custom CSS files.

Jamie Brightmore over 2 years ago

I just updated Codekit today which has updated Saas to 3.4.2 [http://incident57.com/codekit/versionhistory.html] and my sites are now broken, seems the Foundation functions are not working properly.

When creating a new Foundation project in Codekit, I get a raw html output in the browser – no Foundation styling and no Foundation functionality.

Any idea how to fix this?

Chris Rolle over 2 years ago

See https://github.com/zurb/foundation/pull/5651 for a quick fix. Worked for me after updating to Codekit 2.1.4 (and thereby to SASS 3.4.2).

  • open 'scss/foundation/_functions.scss'
  • find line 12: SASS @if (index($modules, $name) == false) {
  • replace with line: SASS @if(not index($modules, $name)) {
  • save, close, compile

Miika Kenttämies over 2 years ago

I had the same problem. Downgrading Sass to version 3.2.19 and compass to 0.12.2 fixed the problem for me.

gem uninstall compass
gem install compass version 0.12.2

gem uninstall sass
gem install sass -v 3.2.19

Took a while to troubleshoot :)
It only compiled, _breadcrumbs.scss, _offcanvas.scss and a bit of _visibility.scss

Jamie Brightmore over 2 years ago

@Chris, many thanks! : )

Evert Albers over 2 years ago

@Chris, you just saved my weekend!

borgulas over 2 years ago

@Chris, that solved it for me. I just started working with Foundation today, and was like why is it not working for me.. I did exactly as instructed. Glad to see it's not my fault. Do I need to change this back later?

//The code edit to make: https://github.com/noeljackson/foundation/commit/037c46220435e0cc34b8a5e5ee0b04c1ec00aecc

James Stone over 2 years ago

There is also some good discussion here about this topic:

https://github.com/zurb/foundation/issues/5691

If you a ruby based sprockets asset pipeline (like I do with ruby middleman) and don't mind the dep. warnings you can use the following:

gem "compass", "1.0.1"
gem "sass", "3.3.14"

if you don't want the warnings polluting your console us the following (this is the solution I used):

gem "compass", "0.12.7"
gem "sass", "3.2.19"

To use compass on the command line, similar to @Miika's solution:

gem uninstall compass
gem install compass version 0.12.7

gem uninstall sass
gem install sass -v 3.2.19

According to the discussion on GH, you should not upgrade to sass 3.4 until the Foundation 5.5 release, which will be breaking for older version of compass / sass, so at that point you will likely need to upgrade.

James Stone over 2 years ago

According to issue 5691 on github Foundation 5.4 does not officially work with Sass 3.4. So for now, you must downgrade to Sass 3.3 (or 3.2 if you don't want the depreciation warnings). The Foundation 5.5 release (forthcoming) will drop support for older versions of Sass but add support for the latest version. So until then, don't update your sass gem.

I used the same solution as @Miika to run compass on the command line. I also use ruby middleman and used the following fix in my Gemfile

gem "compass", "0.12.7"
gem "sass", "3.2.19"

or if you need 3.3 features and don't mind he warnings:

gem "compass", "1.0.1"
gem "sass", "3.3.14"

Chris Rolle over 2 years ago

@borgulas: No, you don't need to change it back. When version 5.5 of Foundation is out, you simply replace your existing Foundation folder with the new one. The new version already includes this fix.

Rafi Benkual over 2 years ago

We're not waiting that long. We pushed up a fix for this. We are deploying Monday to get it out to all of you. https://t.co/y3exJuPaUr

Andrew Tamulynas over 2 years ago

This might be obvious to others, but it wasn't obvious to me, so I'll post it here in case it helps anyone.

While trying to get Foundation going in CodeKit, I was running into the same Sass 3.4.2 troubles as everyone else. I tried Chris Rolle's fix within my CodeKit-installed Foundation project and was thrown the error:

Compass was unable to compile one or more files in the project:
Individual stylesheets must be in the sass directory.

What ended up working for me was starting a new project in the CLI, running 'compas watch' through the CLI, making Chris' one line change, and finally using that directory as the starting point for a new project in CodeKit.

Maybe that's what everyone was talking about all along, but I didn't realize it! Anyway, hope it helps someone.

Brandon Moner over 2 years ago

I work with FoundationPress instead of raw Foundation. We don't have a _functions.scss in the theme structure, however we're still getting the compiling issue listed in the v2.1.5 download notes.

Since the listed fix doesn't apply to FoundationPress, is there anyway you can take a look and maybe see what the issue is with that? I'd be so grateful

James Stone over 2 years ago

@Brandon have you tried compiling with grunt / libsass instead? That workaround has been working for me.

Julian Ćwirko over 2 years ago

So with Foundation ver 5.5 we will be not able to work with Libsass?
No backward compatibility?

Rafi Benkual over 2 years ago

We really need Libsass to make the upgrades to work with Sass 3.4. From their github repo it sounds like they are considering it.

Tim Nethers over 2 years ago

Brandon, open _sprite.scss and replace the function of "@mixin retina-sprite-add" with:

@mixin retina-sprite-add($name, $path, $path2x) {
$retina-sprite-spacing: 2px !default;

$sprite : sprite-map($path, $spacing: $retina-sprite-spacing);
$sprite2x : sprite-map($path2x, $spacing: $retina-sprite-spacing);

$retina-sprite-names : append($retina-sprite-names, $name) !global;

$retina-sprite-sprites : append($retina-sprite-sprites, $sprite) !global;
$retina-sprite-urls : append($retina-sprite-urls, sprite-url($sprite)) !global;

$retina-sprite-sprites2x : append($retina-sprite-sprites2x, $sprite2x) !global;
$retina-sprite-urls2x : append($retina-sprite-urls2x, sprite-url($sprite2x)) !global;
}

Worked for me...

Arie Stavchansky over 1 year ago

I upgraded CodeKit, Sass, and Compass. Then I upgraded Foundation to 5.5.2 using "bower update foundation".

CodeKit compiles the .scss files fine, reporting no errors, but my website still looks broken. The fix provided by Chris did not work for me.

Any advice to resolve?