The Wayback Machine - https://web.archive.org/web/20210604174738/https://github.com/dotnet/aspnetcore/issues/33284
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

Blazor scoped CSS vs Dynamic loaded razor class library #33284

Open
dirething opened this issue Jun 4, 2021 · 0 comments
Open

Blazor scoped CSS vs Dynamic loaded razor class library #33284

dirething opened this issue Jun 4, 2021 · 0 comments

Comments

@dirething
Copy link

@dirething dirething commented Jun 4, 2021

I have blazor server app that uses pages from runtime loaded libraries. The pages work fine, and if I look at a decompile of the page classes I see the scoping attributes that the scoped css in my [pageName].razor.css are meant to be linked to. What I do not see is the ~/_content/[className]/[className].bundle.scp.css being returned from the server or any evidence that it is embedded in the dlls in the first place. the documentation says that the css is bundled at compile time, so I assumed it meant when the library was compiled. After spending about a week looking for what I might be doing wrong I came across the following comment:

We don't embed anything into the assembly, the outputs are just static web assets that get bundled into nuget packages.
...
The only thing that we do across packages is bundle css in the host project/wasm app project.

Originally posted by @javiercn in #10170 (comment)

assuming that is still accurate it would seem I have been wasting my time because this use case was not covered when the css isolation was designed.

is this accurate? and if so is the best I can do here is stick large <style> blocks into the pages themselves or am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant