Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
koureasstavros opened this issue Jan 22, 2025 · 0 comments
Open

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

koureasstavros opened this issue Jan 22, 2025 · 0 comments
Labels
Bug Something isn't working Triage Issue needs to be triaged

Comments

@koureasstavros
Copy link

koureasstavros commented Jan 22, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant