You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request - MdDialog should support max-height, max-width, min-height, and min-width #6024
Hi,
You can assign a class to the Dialog and then style it like you want.
Here is an exemple of a full screen dialog:
this.dialog.open(MyDialogComponent, {
panelClass: 'my-full-screen-dialog',
data: { ... }
});
.my-full-screen-dialog .mat-dialog-container {
max-width: none;
width: 100vw;
height: 100vh;
}
As it is styling a child component you should use the :host property of CSS or put the class in a global CSS file (declare by style.css if you use angular-cli).
Re: Robin - Yeah, the current API of the MdDialog seems to imply that it's static with fixed width and height. And I'd like it to be more flexible and responsible.
Re: Benjamin - I was wondering if using CSS is the officially supported way of making MdDialog responsive. If so, it'd be nice if the API documentation is updated to mention that.
@chaowentan
I don't know if it's the official way to do it... It works fine with me with a responive class.
Yeah, the documentation is always a bit late compare to the real implementation.
Activity
BobBDE commentedon Jul 25, 2017
Hi,
You can assign a class to the Dialog and then style it like you want.
Here is an exemple of a full screen dialog:
this.dialog.open(MyDialogComponent, {
panelClass: 'my-full-screen-dialog',
data: { ... }
});
.my-full-screen-dialog .mat-dialog-container {
max-width: none;
width: 100vw;
height: 100vh;
}
As it is styling a child component you should use the :host property of CSS or put the class in a global CSS file (declare by style.css if you use angular-cli).
chaowentan commentedon Jul 25, 2017
Re: Robin - Yeah, the current API of the MdDialog seems to imply that it's static with fixed width and height. And I'd like it to be more flexible and responsible.
Re: Benjamin - I was wondering if using CSS is the officially supported way of making MdDialog responsive. If so, it'd be nice if the API documentation is updated to mention that.
BobBDE commentedon Jul 25, 2017
@chaowentan
I don't know if it's the official way to do it... It works fine with me with a responive class.
Yeah, the documentation is always a bit late compare to the real implementation.
jelbourn commentedon Jul 25, 2017
@chaowentan happy to accept a PR for this Chao 😉
emilio-martinez commentedon Oct 3, 2017
@jelbourn created PR for this
parindholakia commentedon Nov 16, 2017
I can not run my application after adding minWidth config option.
it throws following error:
Environment:
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.