Menu icon Foundation
Foundation CLI - 'Build' issue

Hi everybody,

I love the new 'Foundation for sites'. It's a great combo (Foundation with Panini and the Foundation CLI).
However, I've run into some issues.

When I'm developing a site while using 'foundation watch', everything works and looks fine.
But when I build a static site (using the 'foundation build' command) some things seem to behave a little odd.

Right now, I'm having the following issues:
#1. Dropdown menu's don't seem to function anymore.
#2. The off-canvas overlay that appears when an off-canvas menu is open doesn't seem to work, however, the off-canvas itself is working just fine.
#3. Images that are using Interchange don't load.

I'm using Foundation CLI version 2.0.2, but how can I find out which version of Foundation for sites I'm using?

Thanks in advance!

clibuildwatch

Hi everybody,

I love the new 'Foundation for sites'. It's a great combo (Foundation with Panini and the Foundation CLI).
However, I've run into some issues.

When I'm developing a site while using 'foundation watch', everything works and looks fine.
But when I build a static site (using the 'foundation build' command) some things seem to behave a little odd.

Right now, I'm having the following issues:
#1. Dropdown menu's don't seem to function anymore.
#2. The off-canvas overlay that appears when an off-canvas menu is open doesn't seem to work, however, the off-canvas itself is working just fine.
#3. Images that are using Interchange don't load.

I'm using Foundation CLI version 2.0.2, but how can I find out which version of Foundation for sites I'm using?

Thanks in advance!

Travis Fulton about 3 years ago

bower_components/foundation-sites/bower.json

hector_sapien about 3 years ago

Thanks. I'm running the latest version (6.1.1)
Anybody have any ideas why my build fail, or have the same issues?

hector_sapien about 3 years ago

Ok, i've found the issue. Al dynamically added styles are removed in the build for production process by UnCSS.
If I remove the UnCSS process from the gulpfile, all issues are gone.

Stacey Irvin about 3 years ago

@hector_sapien Thank you! Thank you! Thank you!

I was having the same trouble with lots of classes and things missing from my app.css causing things in my layout to behave/appear wrong in my dist files after running foundation build. I commented out .pipe(uncss) (around line 124 in gulpfile) and now all is well.

Zurb folks: Why the heck is UnCSS messing everything up? Is there something I could be doing wrong that causes this? Until I know, I'll keep it out of my gulpfile.