Skip to content

Commit 9a39e24

Browse files
crisbetojelbourn
authored andcommitted
fix(dialog): actions not being pulled down when trapping focus (#10007)
Fixes the dialog action buttons not being pulled down to the correct spacing when there is a focus trap around the actions container. These changes remove the `:last-child` selector, because it is easy to break and the actions are intended to always be placed at the bottom of a dialog anyway. Fixes #9722.
1 parent c93103b commit 9a39e24

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/lib/dialog/dialog.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,8 @@ $mat-dialog-button-margin: 8px !default;
4646
display: flex;
4747
flex-wrap: wrap;
4848

49-
&:last-child {
50-
// If the actions are the last element in a dialog, we need to pull them down
51-
// over the dialog padding, in order to avoid the action's padding stacking
52-
// with the dialog's.
53-
margin-bottom: -$mat-dialog-padding;
54-
}
49+
// Pull the actions down to avoid their padding stacking with the dialog's padding.
50+
margin-bottom: -$mat-dialog-padding;
5551

5652
&[align='end'] {
5753
justify-content: flex-end;

0 commit comments

Comments
 (0)