question

PrathameshShende avatar image
0 Votes"
PrathameshShende asked BrandoZhang-MSFT edited

Bootstrap Dark Theme in Blazor WASM

I have two theme of default bootstrap theme and dark theme of bootstrap
https://bootswatch.com/default/
https://bootswatch.com/darkly/

when I set to light then default theme will run. When dark it should use darkly dark theme.

So how to do this. The css will consume in index.html page of blazor wasm. So how i switch to dark and light theme.

dotnet-aspnet-core-blazor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

BrandoZhang-MSFT avatar image
0 Votes"
BrandoZhang-MSFT answered BrandoZhang-MSFT edited

Hi @PrathameshShende,

According to your description, I suggest you could try to modify the CSS style reference by using the jquery inside the wwwroot's index.html file.

More details, you could refer to below codes:

t7gtt.png

Result:

gAOg8.png


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.