Components: MatDialog does not follow material guidelines

Created on 6 Jan 2019  路  6Comments  路  Source: angular/components

What is the expected behavior?

image

What is the current behavior?

image

What are the steps to reproduce?

https://stackblitz.com/edit/angular-pwfr1g?file=app%2Fdialog-overview-example-dialog.html

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Material: 7.2.0

P3 materiadialog

Most helpful comment

There's a PR to default it to end already: https://github.com/angular/material2/pull/13620.

All 6 comments

You can configure the alignment of the buttons but it's not obvious from the documentation.

<div mat-dialog-action align="end">
  <button color="accent" mat-button>CANCEL</button> 
  <button color="accent" mat-button>ACCEPT</button>
</div>

Thank you, the biggest problem is actually the layout, the paddings are completely wrong which results in a really odd dialog.

The specs do seem off on the dialog - https://material.io/design/components/dialogs.html#specs

The documentation page for dialog should at least have an updated sample that specifies buttons align="end" to promote following the standard.

https://material.angular.io/components/dialog/overview

Would be nice to have align="end" as the default. Kind of a pain to have to specify this everywhere or add a css override per project.

There's a PR to default it to end already: https://github.com/angular/material2/pull/13620.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jelbourn picture jelbourn  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

kara picture kara  路  3Comments

MurhafSousli picture MurhafSousli  路  3Comments

julianobrasil picture julianobrasil  路  3Comments