CSS styling setup in Blazor Server

Hello

I am never quite sure exactly how the css files should be structured.  I am using material theme (with theme studio) and my _host file looks like this:


When I publish, I note that this error appears in ApplicationInsights:



So it looks like I am doing something wrong with material.css? I do not reference /css/material.css in the _host file and this file is not present in css folder.  I thought the following line in the _host file took care of that:

<link rel='nofollow' href="_content/Syncfusion.Blazor.Themes/material.css" rel="stylesheet" />


Appreciate any input on what I am doing wrong.

Thank you





3 Replies

MM Manikandan Murugesan Syncfusion Team August 11, 2021 12:08 PM UTC

Hi Richard, 
 
Yes. Following line will load the styles dynamically in the application. 
 
<link rel='nofollow' rel='nofollow' href="_content/Syncfusion.Blazor.Themes/material.css" rel="stylesheet" /> 
 
Kindly remove it at your end if you want to use the custom styles. 
 
Please let us know if you have any concerns. 
Regards, 
Manikandan. 



DI Ditchford August 11, 2021 01:31 PM UTC

Hey Manikandan


Thanks for the info.  So what I am not clear on is why the following console error gets thrown.  I have not referenced this anyway, so I am wondering what is causing the error OR if I need to add a material.css file to the css folder.




Thanks





MM Manikandan Murugesan Syncfusion Team August 12, 2021 03:39 PM UTC

Hi Richard, 
 
We have checked the reported problem and we are unable to reproduce it at our end. Please refer to the following sample and hosted link. 
 
 
 
If still the problem exists, then kindly share us more details about the same with screenshots/video (if possible) which would be helpful for us to proceed further. 
 
Regards, 
Manikandan 


Loader.
Up arrow icon