I'm trying to get CSS isolation to work with the Radzen Blazor components but it seems it is not implemented (correctly).
What I deduce from the rendered Blazor pages is that each tag in the HTML has an attribute which seems to be used as an id for the page. For instance:
<div b-tiop4w2rry="">
Where 'tiop4w2rry' is the page id. In the CSS that is generated by Blazor you can find these 'ids' in the selectors between squared brackets like this:
Where 'xxxx' is your custom unique identifier. Blazor uses that instead of the default. But that doesn't help me either because the Radzen components don't allow the 'xxxx' attribute. Even tried adding via the @attributes keyword but the error stays the same (does not support 'xxxx' attribute).
I don't think CSS isolation works for third party libraries. It seems to only work for applications and their pages. Also your CSS selectors seem off. You probably need this:
My guess is that the Radzen components are created using the BuiltTree mechanism. There the ID attribute should be added and then it would work, I think.
The CSS shown is generated from the local SchedulingGroups.razor.css. The [] are added by the generation.
The source of the Radzen components is available here. They are using regular .razor files. There is no mechanism as far as I know to inject the custom attributes used by the CSS isolation. You can probably use ::deep as shown in the CSS isolation docs.
This means that .rz-datalist-data must be inside an element that has b-p6bayultok as attribute. Wrapping the Radzen.Blazor comonents with a div solves the issue.
Ah, thank you so much. I had added ::deep as you showed in 2., but had not wrapped my Radzen component in an html element (e.g. a < div >). That worked perfect. Thanks!