I have to themes. The default light and a custom dark.
light:
--ion-item-background: #ffffff;
dark:
--ion-item-background: #1a1b1e;
The problem ist that this blocks the color of card.
If ion-item-background
is set in :root
or .dark
of variables.scss
, the color
attribut of ion-card
does not work correctly anymore.
e.g.
<ion-card color="danger">
<ion-card-header>
Hello World
</ion-card-header>
</ion-card>
does not not work if the variable ion-item-background
is set. In this case it looks like empty:
If I remove the variable I get this as expected and also wanted with the variable:
Why use the variable --ion-item-background
?
Well, it looks better. I use --ion-background-color
with light gray and want default color of items white.
I expected that the ion-item-background
is a default color and should not dominate the color atttibute.
How to set the default color? Or is this a bug?
Ionic: 4.7.1