-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Description
If other projects are utilized, such as NuGet packages or Razor class libraries, the bundled file:
References the styles using CSS imports.
Isn't published as a static web asset of the app that consumes the styles.
I'm not able to get this to work, but maybe I'm doing something wrong or not interpreting these comments correctly.
From my understanding, I have a Razor Class Library/NuGet Package, BlazingApple.Survey, and I want to add CSS isolation to one of the components.
Instructions are as follows for the developer of the NuGet package or class library:
- Create the CSS isolation file (same name,
ComponentName.razor.css
). - Build Razor Class Library solution, which are referenced by a consuming client project, where this will automatically be picked up.
Instructions for the consuming project to pickup the CSS isolation associated with an RCL component:
- In the consuming project,
BlazorConsumer2.Client
we reference a stylesheetBlazorConsumer2.Client.styles.css
, which should have the sum total of all of the CSS from our referenced NuGet packages/RCLs, right?
I don't see that happening. Is there something that the NuGet package/RCL needs to do in order to have it's CSS consumed in the project using it? When I look at the bundled CSS file in the consuming project, none of the styles have been added to that stylesheet.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 2703a48e-8b35-53fc-ac36-cfb395833077
- Version Independent ID: 39d464d9-aca6-34fa-7e52-5fde2e393ba7
- Content: ASP.NET Core Blazor CSS isolation
- Content Source: aspnetcore/blazor/components/css-isolation.md
- Product: aspnet-core
- Technology: aspnetcore-blazor
- GitHub Login: @daveabrock
- Microsoft Alias: riande
Metadata
Metadata
Assignees
Labels
Type
Projects
Status