Skip to content

Commit ced4596

Browse files
committed
fixup! feat(material-experimental): MDC-based version of dialog
Address feedback
1 parent 6b11176 commit ced4596

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/material-experimental/mdc-dialog/_dialog-legacy-padding.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ $mat-mdc-dialog-legacy-padding: 24px !default;
2626
}
2727

2828
.mat-mdc-dialog-title, .mat-mdc-dialog-content, .mat-mdc-dialog-actions {
29-
margin-left: $mat-mdc-dialog-legacy-padding * -1;
30-
margin-right: $mat-mdc-dialog-legacy-padding * -1;
29+
margin-left: -$mat-mdc-dialog-legacy-padding;
30+
margin-right: -$mat-mdc-dialog-legacy-padding;
3131
}
3232
}
3333
}

src/material-experimental/mdc-dialog/dialog-container.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {cssClasses, numbers} from '@material/dialog';
3838
'class': 'mat-mdc-dialog-container mdc-dialog',
3939
'tabindex': '-1',
4040
'aria-modal': 'true',
41-
'[attr.id]': '_id',
41+
'[id]': '_id',
4242
'[attr.role]': '_config.role',
4343
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
4444
'[attr.aria-label]': '_config.ariaLabel',
@@ -85,8 +85,9 @@ export class MatDialogContainer extends _MatDialogContainerBase implements
8585
// 1. Foundation does not allow us to disable animations.
8686
// 2. Foundation contains unnecessary features we don't need and aren't
8787
// tree-shakeable. e.g. background scrim, keyboard event handlers for ESC button.
88-
// 3. Foundation uses unnecessary timers for animations in favor of React `setState`
89-
// limitations: https://github.com/material-components/material-components-web/pull/3682.
88+
// 3. Foundation uses unnecessary timers for animations to work around limitations
89+
// in React's `setState` mechanism.
90+
// https://github.com/material-components/material-components-web/pull/3682.
9091
this._startOpenAnimation();
9192
}
9293

src/material/dialog/dialog-container.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export abstract class _MatDialogContainerBase extends BasePortalOutlet implement
238238
'class': 'mat-dialog-container',
239239
'tabindex': '-1',
240240
'aria-modal': 'true',
241-
'[attr.id]': '_id',
241+
'[id]': '_id',
242242
'[attr.role]': '_config.role',
243243
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
244244
'[attr.aria-label]': '_config.ariaLabel',

0 commit comments

Comments
 (0)