Toontje
Toontje

Reputation: 1485

where to define body styles

I'm having this issue where I can't seem to override the background color of the body element in my Neat Bourbon website.

I defined the background color like this in the _layout.scss file:

body {
background: lighten($brokenwhite, 5);
}

but when I check the element in Chrome Devtools, the background color of the body element is still defined as 'white'.

So where can I define the background color of the body element?

My source repository is available here.

Upvotes: 1

Views: 147

Answers (2)

Hashem Qolami
Hashem Qolami

Reputation: 99544

I guess that $brokenwhite color is so bright, hence SASS compiler returns white as the result.

For instance:

$brokenwhite: #eee;

body {
  background: lighten($brokenwhite, 10);
}

The result would be:

body {
  background: white;
}

You could use SassMeister online tool to compile the above example.

Upvotes: 2

aastrong
aastrong

Reputation: 1

I think your SASS is just not compiling, Have try changing it to this maybe .

body {
background: lighten($brokenwhite, 5%);
}

Just added the '%' after the 5. Also make sure that $brokenwhite is a defined variable.

Maybe save what ever sass file this _layout.scss is being imported to just in case ( although it should do this automatically )

Hope this helps.

Upvotes: 0

Related Questions