Skip to content

Commit 3eb7e9c

Browse files
authored
Revert "fix(dialog,bottom-sheet): invert backdrop color on dark themes" (#14492)
* Revert "build: update nodejs bazel rules (#14466)" This reverts commit a3fef46. * Revert "docs(form-field): native select reset values not working in examples (#14236)" This reverts commit 97f52c0. * Revert "fix(menu): allow text wrapping in menu items (#11430)" This reverts commit 3661abe. * Revert "fix(dialog,bottom-sheet): invert backdrop color on dark themes (#13065)" This reverts commit fe96f38.
1 parent a3da8d2 commit 3eb7e9c

File tree

6 files changed

+6
-16
lines changed

6 files changed

+6
-16
lines changed

src/dev-app/dialog/dialog-demo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class DialogDemo {
2828
disableClose: false,
2929
panelClass: 'custom-overlay-pane-class',
3030
hasBackdrop: true,
31-
backdropClass: defaultDialogConfig.backdropClass,
31+
backdropClass: '',
3232
width: '',
3333
height: '',
3434
minWidth: '',

src/lib/bottom-sheet/_bottom-sheet-theme.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@
55
@mixin mat-bottom-sheet-theme($theme) {
66
$background: map-get($theme, background);
77
$foreground: map-get($theme, foreground);
8-
$backdrop-color: invert(mat-color($background, card, 0.288));
98

109
.mat-bottom-sheet-container {
1110
@include _mat-theme-elevation(16, $theme);
1211
background: mat-color($background, dialog);
1312
color: mat-color($foreground, text);
1413
}
15-
16-
.mat-bottom-sheet-backdrop {
17-
background: $backdrop-color;
18-
}
1914
}
2015

2116
@mixin mat-bottom-sheet-typography($config) {

src/lib/bottom-sheet/bottom-sheet-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class MatBottomSheetConfig<D = any> {
3232
hasBackdrop?: boolean = true;
3333

3434
/** Custom class for the backdrop. */
35-
backdropClass?: string = 'mat-bottom-sheet-backdrop';
35+
backdropClass?: string;
3636

3737
/** Whether the user can use escape or clicking outside to close the bottom sheet. */
3838
disableClose?: boolean = false;

src/lib/dialog/_dialog-theme.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,12 @@
77
@mixin mat-dialog-theme($theme) {
88
$background: map-get($theme, background);
99
$foreground: map-get($theme, foreground);
10-
$backdrop-color: invert(mat-color($background, card, 0.288));
1110

1211
.mat-dialog-container {
1312
@include _mat-theme-elevation(24, $theme);
1413
background: mat-color($background, dialog);
1514
color: mat-color($foreground, text);
1615
}
17-
18-
.mat-dialog-backdrop {
19-
background: $backdrop-color;
20-
}
2116
}
2217

2318
@mixin mat-dialog-typography($config) {

src/lib/dialog/dialog-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class MatDialogConfig<D = any> {
5454
hasBackdrop?: boolean = true;
5555

5656
/** Custom class for the backdrop, */
57-
backdropClass?: string = 'mat-dialog-backdrop';
57+
backdropClass?: string = '';
5858

5959
/** Whether the user can use escape or clicking on the backdrop to close the modal. */
6060
disableClose?: boolean = false;

src/lib/dialog/dialog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class MatDialog implements OnDestroy {
189189
* @returns The overlay configuration.
190190
*/
191191
private _getOverlayConfig(dialogConfig: MatDialogConfig): OverlayConfig {
192-
const overlayConfig = new OverlayConfig({
192+
const state = new OverlayConfig({
193193
positionStrategy: this._overlay.position().global(),
194194
scrollStrategy: dialogConfig.scrollStrategy || this._scrollStrategy(),
195195
panelClass: dialogConfig.panelClass,
@@ -203,10 +203,10 @@ export class MatDialog implements OnDestroy {
203203
});
204204

205205
if (dialogConfig.backdropClass) {
206-
overlayConfig.backdropClass = dialogConfig.backdropClass;
206+
state.backdropClass = dialogConfig.backdropClass;
207207
}
208208

209-
return overlayConfig;
209+
return state;
210210
}
211211

212212
/**

0 commit comments

Comments
 (0)