Scoped CSS

Learn how component-specific CSS works.

The application has everything it needs. The last thing we need to do is add some styles. We have the option of defining styles in the src/styles.css file. This is what we did in the last project.

There’s an alternative approach you may want to consider, which uses the component CSS. Every component comes with its CSS files. The app component has the app.component.css file, and the post component has the ...