Skip to content

Commit 4b37b98

Browse files
authored
fix(material-experimental/mdc-core): option text not centered on IE11 (#20626)
We use `min-height` on a flex container for the MDC `mat-option` which hits an IE11 bug where centering doesn't work anymore. These changes add a workaround similar to what we do in `mat-table`.
1 parent b0d0388 commit 4b37b98

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/material-experimental/mdc-core/option/option.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
// which doesn't work well with multi-line options.
2020
min-height: map-get($mdc-list-textual-variant-config, single-line-height);
2121

22+
// Workaround for https://goo.gl/pFmjJD in IE 11. Adds a pseudo
23+
// element that will stretch the option to the correct height. See:
24+
// https://connect.microsoft.com/IE/feedback/details/802625
25+
&::after {
26+
display: inline-block;
27+
min-height: inherit;
28+
content: '';
29+
}
30+
2231
&:not(.mdc-list-item--disabled) {
2332
cursor: pointer;
2433
}

0 commit comments

Comments
 (0)