Loading topic
@Component decorator and an inline template. Here you will learn how Angular keeps a component's styles from leaking, and what that costs you.3 min read@Component, and that you know how Emulated encapsulation scopes styles to a template. If not, review the previous chapter first.2 min read@Component decorator, and that you know CSS selectors and specificity. You should also know the default Emulated behavior from the previous chapter, where each component's styles are scoped to its own template.3 min read@Component decorator, and know that Emulated encapsulation scopes component styles to the component's own template.3 min read:host and :host(.class) selectors. Class and style bindings in templates should also be familiar.3 min readstyles array or string, and understand CSS specificity. Here you will see what ViewEncapsulation.None does, when it is justified, and how its leaks cause bugs.3 min read:host targets the element a component is attached to.3 min read:host works, and how CSS custom properties cross component boundaries. Here you will learn what ::ng-deep does, why Angular deprecated it, and what to use instead.3 min readstyleUrl and styles, and that you know how Emulated encapsulation scopes CSS to a component. It shows how Sass fits into that model.2 min read@Component decorator, and the Emulated, ShadowDom and None encapsulation modes covered earlier. It pulls those tools into one decision process.2 min read