I\'m trying to style an element placed by the router outlet in angular and want to make sure that the element generated gets a width of 100%
From most of the replies
The simple and easy alternative to a deep style is a common style using the element selector of the parent component. So if you had this in hero-details.component.css:
:host ::ng-deep h3 {
font-style: italic;
}
It would become this in styles.css:
app-hero-details h3 {
font-style: italic;
}
Basically a deep style is an un-encapsulated style so it conceptually seems more like a common style to me than a component style. Personally I would not use deep styles anymore. Breaking changes are normal in major version updates and deprecated feature removal is fair game.