Menu icon Foundation
global settings isn't being pulled into settings.scss file

when I go to settings and I place uncomment out a setting I am constantly getting an unbound variable error when compiling - then it dawned on me. I noticed that the global.scss isn't being refereneced in the settings file. should it be? neither is it being referenced in the main foundation.scss file which would alleviate the issue if it was referenced first.

Another odd thing I see is the approach of referencing the global per individual components... Why? Why not reference it once like a style guide so that all components can take advantage of it including the settings?

scssFoundation

when I go to settings and I place uncomment out a setting I am constantly getting an unbound variable error when compiling - then it dawned on me. I noticed that the global.scss isn't being refereneced in the settings file. should it be? neither is it being referenced in the main foundation.scss file which would alleviate the issue if it was referenced first.

Another odd thing I see is the approach of referencing the global per individual components... Why? Why not reference it once like a style guide so that all components can take advantage of it including the settings?

Rafi Benkual over 4 years ago

global is imported in every scss partial, so you don't need to add it manually.

The reason global is imported on all components is because it's needed for every component having it imported in the app.scss in addition to settings and foundation is slightly less convenient.

Rafi Benkual over 4 years ago

I would copy and replace this setting file in for yours to make sure you have all the correct variables. https://github.com/zurb/foundation/blob/master/scss/foundation/_settings.scss

Christian Matthias over 4 years ago

@RafiBenkual

Thanks for the reply but even with the link that you gave me I do not see where global is brought into the settings? I manually did it myself but prior to me manually adding it I didn't see it was there. Furthermore, when I first began to change settings none of them would take as I kept getting an unbound variable error. Ok so now when I add the global the settings work. Am I specifically missing something?

As well, because my settings file is in the my app.scss/foundation.scss file I am able to utilize all of my styleguide variables that are also manually put into my settings file. Wouldn't this work the same if I removed the global from all of the individual components? The settings.scss file is the first file pulled into the foundation.scss file.

Joop Vos over 4 years ago