Skip to content

component CSS isolation not woking #1526

Answered by leigh-pointer
qunshen asked this question in General
Discussion options

You must be logged in to vote

@qunshen correct CSS Isolation is not supported. CSS , Js resources are loaded with in the razor module code.

@code {
    public override List<Resource> Resources => new List<Resource>()
{
        new Resource { ResourceType = ResourceType.Stylesheet, Url = ModulePath() + "Module.css" },
        new Resource { ResourceType = ResourceType.Script, Url = ModulePath() + "Module.js" }
};

It is worth noting that everytime you change a resource you will need to build the module so that the new resources are copied to the corresponding folders. Running in debug will not pick up any changes.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sbwalker
Comment options

Answer selected by qunshen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants