Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(multiple): incosistent item text truncation when used together with MDC list #23138

Merged
merged 1 commit into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-core/option/optgroup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@
// we can't use directly, because it comes with some selectors.
opacity: mdc-list-variables.$content-disabled-opacity;
}

// Needs to be overwritten explicitly, because the style can
// leak in from the list and cause the text to truncate.
.mdc-list-item__primary-text {
white-space: normal;
}
}
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-core/option/option.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
// Pointer events can be safely disabled because the ripple trigger element is the host element.
pointer-events: none;
}

// Needs to be overwritten explicitly, because the style can
// leak in from the list and cause the text to truncate.
.mdc-list-item__primary-text {
white-space: normal;
}
}

.mat-mdc-option-active {
Expand Down
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ mat-menu {
}
}

// Needs to be overwritten explicitly, because the style can
// leak in from the list and cause the text to truncate.
.mdc-list-item__primary-text {
white-space: normal;
}

@include a11y.high-contrast(active, off) {
$outline-width: 1px;

Expand Down