Hello,
I'm trying to apply a custom css class to a Dialog.
This works if I declare the class within the .razor file, while it doesn't work if I put my class in a separate .razor.css file (using css isolation),
I tried to use ::deep in different combinations, but none of them worked.
I attach a sample project. In this project both the red div and the dialog should have a width of 300px. This only happens in the first page.
Thank you, regards
|
<div id="target">
<SfDialog Width="90%" CssClass="myclass" Target="#target">
<DialogTemplates>
<Content> This is a Dialog with content </Content>
</DialogTemplates>
</SfDialog>
</div>>
|
|
::deep .myclass{ max-width: 300px }
|
|
<style>
body .myclass { max-width: 300px !important; } </style> |
Thank you!
Regards,
Roberto
Hi Roberto,
You are welcome. Please get back to us if you need any further assistance.
Regards,
Vinitha