Skip to content

bug(select): multiple select uses single select text color for selected options (on-secondary-container) #30366

Closed
@AJJPostma

Description

@AJJPostma

Description

When using a single select, the selected option gets seconary-container backround color with on-secondary-container text color. When using a multiple select the backround color of selected options stays the same (because there already is a checkbox to show selected state), but the text color still changes to on-secondary-container making it potentially hard to read (depending on your theme).

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-zxlbij2m

  1. Select an option in the single select
  2. Select an option in the multiple select
  3. See invisible selected item in multiple select.

Expected Behavior

mat-option text color should only change when selected for single select

Actual Behavior

mat-option, in mat-select with multiple, text color changes when selected, making it hard/impossible to see on some color schemes.

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/select

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions