Skip to content

CSS isolation: Razor compiler update to emit CSS scope attributes #22776

@SteveSandersonMS

Description

@SteveSandersonMS

This is one of the work items needed for #10170

Given an extra optional "scope ID" string for each .razor file being compiled (which is to be supplied by other work external to this issue), we need the Razor compiler to generate an extra call like:

builder.AddAttribute(seq, ScopeId, null); // adds an empty attribute named ScopeId

... for every HTML element being rendered by that component. This applies equally across regular elements, elements inside RenderFragments, and elements that get optimized into pre-stringified HTML markup fragments.

Metadata

Metadata

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-css-isolationThis issue is related to CSS Isolation feature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions