CSS Isolation

Learn how to use isolated style sheets in Blazor WebAssembly.

The location of the cascading style sheets (CSS) used to style our Blazor WebAssembly apps is usually the wwwroot folder. Usually, the styles defined in those CSS files are applied to all of the components in the web app. However, there are times when we want more control over the styles that are applied to a particular component. To achieve that, we use CSS isolation. With CSS isolation, the styles in the designated CSS file will override the global styles. ...