-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foundation Global Styles overwrite Custom Styles of _settings.scss #72
Comments
@NRG-R9T, thanks for bringing this up as it's actually something I've been working on as well. If you remove the _global.scss from the _settings.scss file, you will lose access to some of your variables. For example, try using some of the included color variables like "$monsoon" in your settings.scss file (without the global styles being imported) - you'll get an error saying that variable has not been declared. I actually opened a thread about this on the Foundation forum when I first noticed the issue: However, it looks like you are correct - the global styles should not need to be imported into the settings file. Let me do some tests and then I will make this correction. PS - I would love any other feedback you have. JointsWP 3 is in development and this type of feedback allows me to see how other developers are using the theme. May I ask what you use to compile Sass? |
I figured out, that the styles get mixed up if I copy the full content of "settings" into "customSettings". The best solution at the moment for me is to add only those of my changes to "customSettings"; probably only those files that are overwritten in "settings" - I'll have to see. And I use my own color variables anyway. At the moment, I still use Prepros to compile. It has a very easy UI to setup. |
Removing the global import from the settings file will fix this issue. I'll be pushing an update today. |
Hi, I have just set up a new instance and was a little confused as to why the background colour was not being applied. So I am OK to remove the following? // Foundation by ZURB // |
you can't just remove the global settings (global.scss), because foundation defines some basic styles of all components there, just before the specific styles are applied in settings.scss. it's a bit of a a mess to find out, what style is defined in global.scss and settings.scss, before the actual stylesheet style.scss is called.
|
While @NRG-R9T method works, there is also an easier way. Simply remove the Global import - this line: More information can be found here: FYI - This issue is fixed in JointsWP 3. |
This was fixed in JointsWP 3 - which is now live. Closing. |
It seems that the problem still occurs in the latest master. For example: we have defined in JWP _settings.scss
then in the bower_components/foundation/scss/components/_global.scss there is
which overrides our previous setup Strangely enough changing something like $row-width in our JWP settings file, does not reflect the changes on our compiled styles.css, even though i do not find it defined in _globals.scss Foundation file. I am currently using the current master version of this branch, using the Foundation version "5.5.2" pulled from bower and using gulp watch to compile the styles. |
@7Ds7, I'm having a hard time replicating this. I'm attaching a screenshot that shows "gulp watch" running. I then changed the default font to "Times New Roman". Which then changed the font on the demo site. |
@JeremyEnglert Thanks for the reply, i do not have problems replicating it although the debugging process leaves me to quite bizarre conclusions I re-setup the project with a new clone from the repo, just to check if anything was wrong in the first place, but it seems that i hit the same strange behaviour. Although it seems that i found at least where the odd problem is, probably it is just on my end and nothing to do with JointsWP, although i leave my process here. The fact is that gulp watch only works on the first run that i save a file, after that it keeps defaulting to the foundation setup. If i cancel the watch, and rerun gulp the JointsWP settings are used again with the assigned values. Notice the font family changing to |
I must say that after a local installation everything works fine as regarding JointsWp. I still have problems on a remote machine, but by now i am pretty sure it is on my end so, this ticket can be closed again. Sorry for the inconvenience and thanks for the reply ( and thank you for JointsWP as well ) |
I want to change the body-background color (as an example), but "_global.scss" overrites the custom changes in "_settings.scss" (with the default value of foundation). Since Global Styles should be left untouched (to update "/bower_components/" later), and the only way to get the color through was to write it as CSS into "style.scss", I had to figure out something more Sass-like.
"_global.scss" is imported at the top of "_settings.scss", and overwrites my changes. So I did copy the full content of "settings.scss" into a new file called "_customSettings.scss". I imported that into style.scss. the position there is just before "settings.scss", like this:
then I deleted the import of "_global.scss" in the "customSettings", so it's not overwriting my changes there. "_global.scss" is still imported with the "settings" file, it seems to me that nothing gets broken - does anyone see a problem with that or can suggest a better fix?
The text was updated successfully, but these errors were encountered: