Menu icon Foundation
Best Practice with Foundation + Sass

I've just installed Foundation 5 with Sass and am using Compass to watch my stylesheets. I wanted to know what's the best practice for adding my custom styles. I've already created a custom.scss file and am referencing it using @import "custom"; in my app.scss file.

If I wanted to go ahead and change the background colour of the body, for example, how would I go about doing this using the mixins. I'm adding:

$body-bg: red;

to my custom.scss file, but the body's background isn't changing.

Any idea what I'm doing wrong? Thanks in advance!

Sasscompass

I've just installed Foundation 5 with Sass and am using Compass to watch my stylesheets. I wanted to know what's the best practice for adding my custom styles. I've already created a custom.scss file and am referencing it using @import "custom"; in my app.scss file.

If I wanted to go ahead and change the background colour of the body, for example, how would I go about doing this using the mixins. I'm adding:

$body-bg: red;

to my custom.scss file, but the body's background isn't changing.

Any idea what I'm doing wrong? Thanks in advance!

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

Julian Ćwirko almost 6 years ago

in scss folder you have _settings.scss - this is where all settings like $body-bg goes, so find $body-bg param and uncomment it

Raphael Essoo-Snowdon almost 6 years ago

So editing the _settings.scss is the best way to do it?

Mihai Stroe almost 6 years ago

@Raphael

Technically you can ignore the settings partial completely but it's recommended you edit its values directly instead of replicating things in your custom Sass -as Julian said, make sure to uncomment anything you want to change. Take a look through it and see what settings it contains and allows you to change.

Raphael Essoo-Snowdon almost 6 years ago

Thanks @Mihai!