# Ionic 4 - sass best practices

**URL:** <https://forum.ionicframework.com/t/ionic-4-sass-best-practices/154250>\
**Category:** Ionic Framework\
**Created:** [January 26, 2019, 12:17pm UTC](https://forum.ionicframework.com/t/ionic-4-sass-best-practices/154250 "2019-01-26T12:17:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtpHarry](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rtpharry/32/121938_2.png) [@rtpHarry](https://forum.ionicframework.com/u/rtpHarry)\
**Post date:** [January 26, 2019, 12:17pm UTC](https://forum.ionicframework.com/t/ionic-4-sass-best-practices/154250/1 "2019-01-26T12:17:35Z")

</div>

The background of my app I’m setting my `ion-content` to a background colour.

This means I want all of my `ion-card` to have a white background.

It’s supported in the docs, it says I should do this:

```auto
// (theme\variables.scss)
ion-card {
  --background: var(--brand-white) !important;
}

```

But then a sneaky rule jumps in and overrides it:

![image](https://global.discourse-cdn.com/ionicframework/original/3X/d/3/d3a4ae97093c98127a4cbfb7ce5dc0243b04d9cc.png)

I have to put `!important` on the `ion-card` `--background` variable to get it to work.

I’m just starting out so I’m keen to learn best practices. Am I doing something wrong?

This works:

```auto
// (theme\variables.scss)
ion-card {
  --background: var(--brand-white);
  --ion-item-background: var(--brand-white);
}

```

Is this a bug in the element or maybe the documentation? Or am I doing it wrong?

---

<div class="post-metadata">

**Author:** ![Catweazle101](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/catweazle101/32/115865_2.png) [@Catweazle101](https://forum.ionicframework.com/u/Catweazle101)\
**Post date:** [January 29, 2020, 3:25pm UTC](https://forum.ionicframework.com/t/ionic-4-sass-best-practices/154250/2 "2020-01-29T15:25:34Z")

</div>

I’m facing the same problem ☹  
Are there any solution for this?  
I’m just starting to customize something and it doesn’t works already on simple things…?
