How to style a component in angular? I use angular 5 and I tried this:
:host {
background-color: green;
size: 200px 200px;
}
And this:
app-root {
background-color: green;
size: 200px 200px;
}
Both approaches don't seem to work.
How to style a component in angular? I use angular 5 and I tried this:
:host {
background-color: green;
size: 200px 200px;
}
And this:
app-root {
background-color: green;
size: 200px 200px;
}
Both approaches don't seem to work.
You also need to set the display property to something like block. This can be seen in the example from the docs:
:host {
background-color: green;
size: 200px 200px;
display: block;
}
The display property is inline by default (you can see this in the developer tools, etc).