MdDialog width configuration uncenter dialog.
See original GitHub issueBug, feature request, or proposal:
Bug: MdDialog not centered when is open passing a configuration of a custom width.
What is the expected behavior?
MdDialog should be the size of the specified width but keep his center location.
What is the current behavior?
MdDialog is being moved to the left.
What are the steps to reproduce?
https://plnkr.co/edit/fvG6lS8VIihJUlfu01Bv?p=preview
openDialog() { this.dialog.open(DialogOverviewExampleDialog, { width: '600px' }); }
Which versions of Angular, Material, OS, browsers are affected?
Material 2.0.0-beta.2 Chrome in Windows
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How to set up the max-width of $mdDialog? - Stack Overflow
To achieve what you want you should use this way: .md-dialog-content { max-width: 300px; }.
Read more >Services > $mdDialog - AngularJS Material
$mdDialog opens a dialog over the app to inform users about critical information or require them to make decisions. There are two approaches...
Read more >MdDialog not resizing height to contents on open · Issue #2351
trying to create an MdDialog using the Material 2 library. Expect the dialog to automatically size to the contents of the dialog.
Read more >embedding widget in mdDialog - ServiceNow Community
We would like to embed a widget in a mdDialog modal box, and am wondering how to do it. ... <div class="md-dialog-container" id="scheduleAppts">....
Read more >How do I configure a full height Angular Material Dialog that ...
I set a height & width to my popup using the below code. When I open my dialog, the bottom portion is cut...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As another solution, you can add a
panelClass
to the dialog and then apply whatever css just to that specific dialog.@julianobrasil the styles must be global or without view encapsulation 😁
https://plnkr.co/edit/lGFjGSmhlr9tOoHK1gJp?p=preview