<mat-dialog-actions>: Button spacing does not match MD spec
See original GitHub issueBug, feature request, or proposal:
Buttons that are inside mat-dialog-actions
currently have no padding/margin to the left or right. There should be padding between buttons as described in the Material Design spec.
Buttons inside mat-card-actions
do have a margin left and right of 4px, providing some sort of spacing.
What is the expected behavior?
See Material Design dialogs specs: https://material.io/guidelines/components/dialogs.html#dialogs-specs
What is the current behavior?
See screenshot below taken from the Angular Material example site.
)
What are the steps to reproduce?
Visit the Angular Material example site: https://material.angular.io/components/component/dialog
What is the use-case or motivation for changing an existing behavior?
Match Material Design spec.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:14 (6 by maintainers)
Top Results From Across the Web
How to align buttons in the MdDialog md-dialog-actions block
You can align md-dialog-actions with the align attribute which is available Material 2.0.0-beta.2 on words. Update version if you are not on the...
Read more >how to prevent mat dialog close on click outside - You.com
1 Answer. import { MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog'; @NgModule ( { providers: [ { provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: { ...
Read more >Toolbar | Angular Material
<mat-toolbar> is a container for headers, titles, or actions. ... The Material Design specifications describe that toolbars can also have multiple rows.
Read more >How to Size and Position the MUI Dialog Component - Medium
The Material-UI (MUI) Dialog component is one of the most challenging MUI components to style. It is composed of a modal, container, ...
Read more >The Form element - HTML: HyperText Markup Language | MDN
If this attribute is not set (and therefore the form is validated), it can be overridden by a formnovalidate attribute on a <button> ......
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
This is what I do in my SCSS:
If I want to push a button to the left side, I put a greedy span in-between the buttons.
But if you want to support RTL layouts, that’s a whole other issue.
@demetrio812 I was able to work around this using the
panelClass
API of md-dialog, setting my dialog’sViewEncapsulation.NONE
, and applying the following styles to my class:These seemed to have the best match with the Material Design spec.