benadzs
benadzs

Reputation: 147

Ionic SASS variables seem's like doesn't working

I want change the background color. Like this:

$red: red;

ion-router-outlet, ion-header ion-toolbar{
  --ion-background-color: $red;
  --background: $red;
}

But it's doesn't working.

ion-router-outlet, ion-header ion-toolbar{
  --ion-background-color: red;
  --background: red;
}

Is it working... what is the problem?

Upvotes: 1

Views: 105

Answers (1)

benadzs
benadzs

Reputation: 147

In variables.scss I wrote:

...
--background-white: #F6F6F6;
...

And in the app.scss:

ion-router-outlet, ion-header ion-toolbar{
  --ion-background-color: var(--background-white);
  --background: var(--background-white);
}

Upvotes: 1

Related Questions