© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
3 replies
Philip

C# Blazor CSS Isolation

I've been trying to get CSS isolation to work for ages now, and no information online seems to be working. It seems fairly straight forward when following a guide like this https://learn.microsoft.com/en-us/aspnet/core/blazor/components/css-isolation?view=aspnetcore-8.0 And does work as intended when creating a new project, but not on this project here, which I've been working on for a while: https://github.com/KNPhilip/BlazorEcommerce/tree/fix/cssHell

I found out it's not necessarily the Assembly name, as stated by a lot of different posts, but rather the project id. I have been following this guide to get to the bottom of it: https://stackoverflow.com/questions/76975644/blazor-css-isolation-and-the-packageid but even that static handling of the id doesn't work either! I feel like I have no options left. Any CSS Isolation wizards here who might be able to help a feller out?
ASP.NET Core Blazor CSS isolation
Learn how CSS isolation scopes CSS to Razor components, which can simplify CSS and avoid collisions with other components or libraries.
ASP.NET Core Blazor CSS isolation
GitHub
GitHub - KNPhilip/BlazorEcommerce at fix/cssHell
Full-Stack eCommerce application built using .NET's Blazor technology. - GitHub - KNPhilip/BlazorEcommerce at fix/cssHell
GitHub - KNPhilip/BlazorEcommerce at fix/cssHell
Stack Overflow
Blazor CSS Isolation and the PackageId
I am not actually detailing a problem, I am detailing a potential solution for anyone who may be interested. Firstly, I have established that to use CSS Isolation in a Blazor server application you...
Blazor CSS Isolation and the PackageId
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Blazor doesn't add CSS Isolation file ✅
C#CC# / help
3y ago
❔ Blazor WebAssembly CSS
C#CC# / help
3y ago
❔ maui hybrid css isolation problems
C#CC# / help
3y ago
Blazor css not applied
C#CC# / help
14mo ago