Skip to content

Commit 64697fc

Browse files
committed
fix(material/dialog): css structure change
* change the css structure of the dialog surface and it's children
1 parent 88f6648 commit 64697fc

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/material/dialog/_mdc-dialog-structure-overrides.scss

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@
3838
max-width: inherit;
3939
}
4040

41-
// MDC by default sets the `surface` to `display: flex`. MDC does this in order to
42-
// be able to make the content scrollable while locking the title and actions. This
43-
// does not work in our dialog anyway because due to the content projection, arbitrary
44-
// components can be immediate children of the surface and make this a noop. If only
45-
// templates or DOM elements are projected, the flex display could cause unexpected
46-
// alignment issues as explained in our coding standards (see `CODING_STANDARDS.md`).
47-
// Additionally, the surface by default should expand based on the parent overlay
48-
// boundaries (so that boundaries for the overlay config are respected). The surface
49-
// by default would only expand based on its content.
5041
.mdc-dialog__surface {
51-
display: block;
5242
width: 100%;
5343
height: 100%;
5444
}
45+
46+
// MDC sets the `surface` to `display: flex`. MDC does this in order to be able to make the
47+
// content scrollable while locking the title and actions. This only works in our dialog if we
48+
// set the children of the `surface` to `display: contents`. This is because, due to content
49+
// projection, arbitrary components can be immediate children of the surface and make this a
50+
// noop.
51+
.mat-mdc-dialog-surface > * {
52+
display: contents;
53+
}
5554
}
5655
}

0 commit comments

Comments
 (0)