CSS isolation in Blazor

To enable CSS isolation, create a razor.css file matching the .razor file for the component in the same folder.
For example, if your component is named “Isolate.razor,” create a file alongside the component named “Isolate.razor.css.” The Isolate.razor.css file is placed in the same folder as the Isolate.razor component.


@page "/isolate"
<h1>Hello, World</h1>
<p>Welcome   to your new app</p>


h1 {
       color: blue;
       font-style: italic;
       text-shadow: 2px 2px 2px gray;