I need help in setting the background-color of a page to a different color using Host Selector. I tried the example in stackblitz https://stackblitz.com/edit/angular-hknw2a?file=src%2Fapp%2Fapp.component.scss, not sure how to set for the whole page. Thanks in advance.
1 Answer
Set width and min-height in Host selector to set background-color for the whole page.
body {
margin:0px;
}
:host{
background-color: aquamarine;
display:block;// comment this tyo have "no background"
width: 100vw;
min-height:100px;
}
1 Comment
PremKumar
Thank you, took time to make some changes in my code and fix. Finally worked with, "width: 100%; min-height:100vh;"
inlineby default as they aren't part of the HTML spec.