Skip to content

Regression: CSS isolation not applying all styles in Blazor Server .NET 10 #64641

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:Visual Studio Version 2026 18.0.2]
Environment:

Blazor Server Web App

.NET 10.0.100 SDK

Visual Studio 18.0.2 (Community)

EF Core Power Tools latest

SSMS 22

No Azure services involved

Steps to reproduce:

Create a new Blazor Server Web App project in .NET 10.

Copy existing components and CSS files (App.css, MainCss.css, DefaultCss.css, etc.) into wwwroot/lib.

Add <link> references in App.razor (or host page).

Apply a theme class to <body> (e.g., class="Free-0").

Run the app.

Expected behavior:

Global CSS variables (--Main, etc.) defined in MainCss.css should be recognized.

Dropdowns and other styles should apply as they did in earlier Blazor versions.

Actual behavior:

FontAwesome icons load correctly.

Some CSS rules apply (basic styles).

Dropdown styles and theme variables (--Main) show as “not defined” in dev tools.

Isolation seems to block or ignore certain global styles.

Notes:

Worked in previous Blazor versions.

Regression observed after upgrading to .NET 10 templates.

TheProjectName.styles.css loads, but global CSS doesn’t cascade into isolated components.

Possible gap in CSS isolation pipeline.


Original Comments

Feedback Bot on 12/3/2025, 07:32 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issuearea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions