how can i override :host css
:host {
--width: 304px;
--min-width: auto;
--max-width: auto;
--height: 100%;
--min-height: auto;
--max-height: auto;
--background: var(--ion-background-color, #fff); // <-- i want to shut this down
inset: 0px;
display: none;
position: absolute;
contain: strict;
}
PS. this css is on ion-content
I'd appreciate any help.
how can i override :host css
:host {
--width: 304px;
--min-width: auto;
--max-width: auto;
--height: 100%;
--min-height: auto;
--max-height: auto;
--background: var(--ion-background-color, #fff); // <-- i want to shut this down
inset: 0px;
display: none;
position: absolute;
contain: strict;
}
PS. this css is on ion-content
I'd appreciate any help.
Share Improve this question asked Jul 21, 2021 at 20:56 Mukash WastiMukash Wasti 1512 silver badges17 bronze badges1 Answer
Reset to default 5You don't have to change the :host
CSS to change the background of ion-content
. You can add this to your CSS
ion-content{
--ion-background-color:#111D12; // Or whatever color you want
}
But if you really want to change :host
CSS, then you can add this in your global CSS file.
:host {
--background: none; // or whatever color you want
}