Menu icon Foundation
Modify gulpfile.js to process other SCSS files

I am trying to get LibSass to process other .SCSS files in addition to the app.scss in the /SCSS folder.

In the past (Foundation 5) I was sure that any SCSS file in the /scss folder, just got processed along with app.scss, as long as it was not preceeded with an underline (ie: _filename.scss)

This doesn't seem to be happening, and I am not sure why?

I am unsure how to modify the gulpfile.js for Foundation 6 if that is what is the issue.

Thank you in advance for any help!

scssgulpfile.js

I am trying to get LibSass to process other .SCSS files in addition to the app.scss in the /SCSS folder.

In the past (Foundation 5) I was sure that any SCSS file in the /scss folder, just got processed along with app.scss, as long as it was not preceeded with an underline (ie: _filename.scss)

This doesn't seem to be happening, and I am not sure why?

I am unsure how to modify the gulpfile.js for Foundation 6 if that is what is the issue.

Thank you in advance for any help!

This post has been closed. No new replies can be added.

Ercan Murat KISACA almost 4 years ago

Hi,
After creating the file _filename.scss you must add these lines to your app.scss file. I think this is a better practice, all your css lives in 1 file.

@import 'filename'; 

Brian Tan almost 4 years ago

Change 'sass' task from app.scss to *.scss

Kirk Nicholson almost 4 years ago

Hi Ercan, thank you for the reply!

Yes I do know how to do that, however... to make a very long story short...

I need to have several versions of the app.css when I am finished, in order to be able to dynamically call different sets of CSS for different design style sets, within the same website, but all based on the Foundation base CSS

for example:
app.css <= (which is the standard Foundation CSS)
app_blueEco.css <= (a style set using blues)
app_greenTile <= (a style set using greens)

I do create those CSS files from the SCSS with @import to bring them together, and have them processed into the CSS files.

I was able to do this in F5 without problems :(

Kirk Nicholson almost 4 years ago

Thank you! @Brian Tan

That is the fix i was looking for!!