Skip to content

Commit c3bb3a9

Browse files
committed
fix(material-experimental/mdc-core): avoid style conflicts between MDC list and MDC option
The specificity of the MDC option was low enough that the list was overriding it when the list loads after the option.
1 parent eee19f7 commit c3bb3a9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
@include mat.private-user-select(none);
1414
cursor: pointer;
1515

16+
// If the MDC list is loaded after the option, this gets overwritten which breaks the text
17+
// alignment. Ideally we'd wrap all the MDC mixins above with this selector, but the increased
18+
// specificity breaks some internal overrides.
19+
&.mdc-list-item {
20+
align-items: center;
21+
}
22+
1623
// Set the `min-height` here ourselves, instead of going through
1724
// the `mdc-list-one-line-item-density` mixin, because it sets a `height`
1825
// which doesn't work well with multi-line options.

0 commit comments

Comments
 (0)