Skip to content

Commit 43b463f

Browse files
authored
fix(material/dialog): incorrect action height if box-sizing is configured globally (#20889)
It's common for apps to set `* { box-sizing: border-box; }` at a global level which ends up breaking the styles of our dialog. These changes set an explicit `box-sizing` to ensure that it still looks consistently. This is in line with what we've done in other similar cases. Fixes #20887.
1 parent ea2f29d commit 43b463f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/material/dialog/dialog.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ $mat-dialog-button-margin: 8px !default;
5050
min-height: 52px;
5151
align-items: center;
5252

53+
// Explicitly set a box-sizing since people commonly set `border-box`
54+
// on all elements which will break the height of the dialog actions.
55+
box-sizing: content-box;
56+
5357
// Pull the actions down to avoid their padding stacking with the dialog's padding.
5458
margin-bottom: -$mat-dialog-padding;
5559

0 commit comments

Comments
 (0)