components icon indicating copy to clipboard operation
components copied to clipboard

MatDialog does not follow material guidelines

Open Ploppy3 opened this issue 7 years ago • 9 comments

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

Ploppy3 avatar Jan 06 '19 16:01 Ploppy3

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>

manklu avatar Jan 06 '19 17:01 manklu

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

Ploppy3 avatar Jan 07 '19 10:01 Ploppy3

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

andrewseguin avatar Jan 09 '19 23:01 andrewseguin

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

michael-lang avatar Mar 25 '19 16:03 michael-lang

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.

epelc avatar Apr 15 '19 15:04 epelc

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

crisbeto avatar Apr 17 '19 16:04 crisbeto

@andrewseguin It seems the padding is wrong as well.

image

anwalkers avatar Jun 30 '23 16:06 anwalkers

This should be addressed with M3.

crisbeto avatar Nov 25 '25 10:11 crisbeto

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.