how can i override :host css
JavaScript
x
13
13
1
:host {
2
--width: 304px;
3
--min-width: auto;
4
--max-width: auto;
5
--height: 100%;
6
--min-height: auto;
7
--max-height: auto;
8
--background: var(--ion-background-color, #fff); // <-- i want to shut this down
9
inset: 0px;
10
display: none;
11
position: absolute;
12
contain: strict;
13
}
PS. this css is on ion-content
I’d appreciate any help.
Advertisement
Answer
You don’t have to change the :host
CSS to change the background of ion-content
. You can add this to your CSS
JavaScript
1
4
1
ion-content{
2
--ion-background-color:#111D12; // Or whatever color you want
3
}
4
But if you really want to change :host
CSS, then you can add this in your global CSS file.
JavaScript
1
4
1
:host {
2
--background: none; // or whatever color you want
3
}
4