Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How might I share css files between both a MAUI Blazor mobile app and a Blazor web app?

$
0
0

I have started a .Net 9.0 'MAUI Blazor Hybrid and Web App' project.The solution contains the following projects:

  • myawesomeapp
  • myawesomeapp.Shared
  • myawesomeapp.Web
  • myawesomeapp.Web.Client

I am going to create mainly Blazor web assembly components in myawesomeapp.Shared, which can then be used in the mobile app and the web app.I would also like both applications to share a cascading style sheet, to avoid duplication and potential inconsistencies.I have tried calling the css from the App.razor file and the mobile index.html from a CDN site:

<link href="http://cdn.myawesomedomain.com/cogs/myawesomestylesheet.css" rel="stylesheet"/>

But it doesn't load.How might I reference the css file if I place it in the myawesomeapp.Shared project, please?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>