Skip to content

Commit 2ae48eb

Browse files
committed
fixup! fix(material/dialog): css structure change
1 parent 2a599ae commit 2ae48eb

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
}
4545
}
4646

47+
// When a component is passed into the dialog, the host element interrupts
48+
// the `display:flex` from affecting the dialog title, content, and
49+
// actions. To fix this, we make the component host `display: contents` by
50+
// marking it's panel with the `mat-mdc-dialog-component-panel` class.
51+
//
52+
// Note that this problem does not exist when a template ref is used since
53+
// the title, contents, and actions are then nested directly under the
54+
// dialog surface.
4755
.mat-mdc-dialog-component-panel .mat-mdc-dialog-surface > * {
4856
display: contents;
4957
}

src/material/dialog/dialog.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,14 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
166166
config.id = config.id || `${this._idPrefix}${uniqueId++}`;
167167
config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();
168168

169-
// When a component is passed into the dialog, the host element interrupts the `display:flex`
170-
// from affecting the dialog title, content, and actions. To fix this, we make the component
171-
// host `display: contents` by marking it's panel with the `mat-mdc-dialog-component-panel`
172-
// class.
169+
// When a component is passed into the dialog, the host element interrupts
170+
// the `display:flex` from affecting the dialog title, content, and
171+
// actions. To fix this, we make the component host `display: contents` by
172+
// marking it's panel with the `mat-mdc-dialog-component-panel` class.
173173
//
174-
// Note that this problem does not exist when a template ref is used since the title,
175-
// contents, and actions are then nested directly under the dialog surface.
174+
// Note that this problem does not exist when a template ref is used since
175+
// the title, contents, and actions are then nested directly under the
176+
// dialog surface.
176177
if (!(componentOrTemplateRef instanceof TemplateRef)) {
177178
this._appendPanelClass(config);
178179
}

0 commit comments

Comments
 (0)