Skip to content

Blazored.Modal injected css does not follow the base path #593

@koureasstavros

Description

@koureasstavros

I am using Blazored.Modal into a Blazor Hosted WASM, meaning that there are three projects, the Client, the Server and the Shared then. The solution using css isolation.

When using base path on the Client project, like below:

<base href="/app/" /> <!-- NEED TO START AND END WITH SLASH -->

Then the file Blazored.Modal.bundle.scp.css seems not to be inside the /app folder and also seems to be imported into the main css ({ASSEMBLY_NAME}.Client.styles.css) of the application with following refference:

@import '../_content/Blazored.Modal/Blazored.Modal.bundle.scp.css';

Image

As a workaround we can refference this file manually into index.html which will follow the base path and will import the file into /app/_content/Blazored.Modal/Blazored.Modal.bundle.scp.css:

<link href="_content/Blazored.Modal/Blazored.Modal.bundle.scp.css" rel="stylesheet" />

This will make the pop-up windows (modals) work but the error of invalid refference will continue to show up into the console. I belive the Blazored.Modal.bundle.scp.css should be inside subpath directory and then be imported into isolated file without relative father folder.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingTriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions