0

I have an 'odd' component in my Blazor app with a Razden datagrid in it. I use my default CSS across all components but this very one in question needs specific CSS to render properly:

<link rel="stylesheet" href="_content/Radzen.Blazor/css/default.css">

When I add it using _Layout.cshtml it - it works fine for my datagrid but overwrites certain styles across other components, so I need to reference this .css individually in my 'Radzen' component.

As per Microsoft recommendation I downloaded the content of this .css using dev tools and created a css file under the component like so:

radzencomponent.razor
razdencomponent.razor.css

It doesn't work though. The css doesn't seem to be picked up...

Any idea?

tom33pr
  • 853
  • 2
  • 12
  • 30
  • 1
    Ensure that in your layout you have a link to . The component level css is generated via this link. If it's not there, what you've done won't work. – paulpitchford Jun 10 '23 at 07:54
  • Thanks @paulpitchford. Yes. I had it already added there... I tested it further and it looks like the problem is to do with the contents of radzen css file that I downloaded. I will need to strip it down line by line to see what actually causes the issue. – tom33pr Jun 12 '23 at 08:37

0 Answers0