Use CSS isolation in AspNet Core MVC, Razor Pages, and Blazor
ASP.NET Core developers often store styling information for MVC views, Razor Pages, and Razor Components into a style sheet file. The style sheet is then applied to various pages using HTML element. Although this works great in many cases, at times you might want to isolate view / page / component specific styling information into its own CSS file. Luckily, MVC views, Razor Pages, and Razor Components support such CSS isolation. This article explains how.
http://www.binaryintellect.net/articles/d94c00f5-e8fe-44ef-8a6e-1a4d66510c9f.aspx