-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MdDialog container padding does not match spec #2735
Comments
Have we found a fix for this? I can remove the 24px padding via Chrome Dev Tools as .mat-dialog-container but not within CSS. |
I need to remove the padding on the mat-dialog-container which is now default at 24px. Pls suggest if any way to remove or override it. |
as a workaround you can put this to your global styles (src/styles.css) |
i have more than 1 dialog if im using : .mat-dialog-container { |
Try this work around, its a bit extreme having to use view encapsulation but worked for me. https://stackoverflow.com/questions/42306850/need-to-find-css-selector-for-material-design-2s-md-dialog-container |
Here is my solution, which i think will work for most of the cases, without messing with the view encapsulation prop.
|
you can Simply check this to remove the useless padding // Add this to your global stylesheet after your theme setup this.dialog.open(MyDialogComponent, {panelClass: 'myapp-no-padding-dialog'}) |
Closing this issue since the 2018 updates to the Material Design spec will supersede what's described here. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
MdDialog (
<md-dialog-container>
) currently pads the entire child (user-supplied) content with 24px.It should not pad the action content (or rather, pad according to the spec).
What is the expected behavior?
It should only pad the non-action content. Source
What is the current behavior?
It pads all the content.

What are the steps to reproduce?
See here.
What is the use-case or motivation for changing an existing behavior?
To match the Material spec.
Which versions of Angular, Material, OS, browsers are affected?
Angular & Material: current
OS: any/all
Is there anything else we should know?
n/a
The text was updated successfully, but these errors were encountered: