MatBlazor
MatBlazor copied to clipboard
how to set the width for a Dialog
is there is a way to set the width of a Dialog to be stretched based on the content or even given a fixed value

Thanks for your issue/idea. In the near future will be implemented.
@lakani By default the dialog surface is set to a max-width of 560px. My work-around was to create my own css file that loads after MatBlazor with the below to override.
.mdc-dialog .mdc-dialog__surface { max-width: none; }
No news ?
I tried :
<style>
mdc-dialog .mdc-dialog__surface {
width: 500px;
}
</style>
But it doesn't seems to work :-P
No news ?
I tried :
<style> mdc-dialog .mdc-dialog__surface { width: 500px; } </style>But it doesn't seems to work :-P
It needs to be .mdc-dialog as it is a class.
No news ?
I tried :
<style> mdc-dialog .mdc-dialog__surface { width: 500px; } </style>But it doesn't seems to work :-P
You need to load the file that overrides MatBlazor css after you have loaded matBlazor.css. If you load your file before you need to specify !important like this:
.mdc-dialog .mdc-dialog__surface {
max-width: none !important;
}
Any update on this feature?
this has probably changed now the correct css override is
.mud-dialog-width-sm{
max-width: none !important;
}