Skip to content

Commit a20dfd3

Browse files
crisbetojelbourn
authored andcommitted
fix(dialog): min-height and max-height not having an effect on dialog container (#11235)
When setting the `min-height` or `max-height` on a dialog, the properties get applied to the overlay pane, however the dialog's `height: 100%` won't apply if the parent's height isn't known which breaks the min and max values. These changes ensure that the dialog matches the `min-height` and `max-height` from the config.
1 parent 9f282b6 commit a20dfd3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/dialog/dialog.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ $mat-dialog-button-margin: 8px !default;
2222
width: 100%;
2323
height: 100%;
2424

25+
// Since the dialog won't stretch to fit the parent, if the height
26+
// isn't set, we have to inherit the min and max values explicitly.
27+
min-height: inherit;
28+
max-height: inherit;
29+
2530
@include cdk-high-contrast {
2631
outline: solid 1px;
2732
}

0 commit comments

Comments
 (0)