There are some nice articles explaining what are CSS Modules, so I recommend you reading them first:
CSS Modules are useful in the following scenarios:
We can use CSS Modules with Angular through postcss-modules and posthtml-css-modules.
First, postcss-modules hash all the class names in the styles files in build time.
Example: takes app.component.scss
.grid-container {
display: grid; grid-template-rows: auto;
grid-template-rows: 90px calc(100vh - 170px) 80px;
width: 100vw; height: 100vh;
}
.header {
background-color: #1ba0f7;
display: flex;
align-items: center;
justify-content: flex-start;
img {
width: 64px;
height: 64px;
}
}
.footer {
background-color: #1ba0f7;
}
#angular #css