Reputation: 17570
I am developing ionic mobile app. When I write code below in scss,
ion-content{
background: rgba(15, 19, 31, 0.94) no-repeat;;
width: 100%;
height: 100%;
display: table;
}
I can't change background of item. Because code below prevent to make it. ı cant find where it is written .
:host {
--background: var(--ion-background-color,#fff);
--color: var(--ion-text-color,#000);
--padding-top: 0px;
--padding-bottom: 0px;
--padding-start: 0px;
--padding-end: 0px;
--keyboard-offset: 0px;
--offset-top: 0px;
--offset-bottom: 0px;
--overflow: auto;
display: block;
position: relative;
-ms-flex: 1;
flex: 1;
width: 100%;
height: 100%;
margin: 0!important;
padding: 0!important;
font-family: var(--ion-font-family,inherit);
contain: layout size style;
}
How can I change background of ion-content.There is a way that writing div inside it and giving style to it. but I don't want to do this. I want to give style directly to item.
Thanks in advance.
Upvotes: 0
Views: 259
Reputation: 2609
Just use
ion-content{
--background: rgba(15, 19, 31, 0.94) no-repeat;
}
Upvotes: 2