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

bug(option): mat-options with long text lack of gap since v15 #26701

Open
1 task done
MikaStark opened this issue Feb 27, 2023 · 1 comment
Open
1 task done

bug(option): mat-options with long text lack of gap since v15 #26701

MikaStark opened this issue Feb 27, 2023 · 1 comment
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent regression This issue is related to a regression

Comments

@MikaStark
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14

Description

Before v15, mat-options with long text were truncated so their height was always 48px and naturally, a gap was there to well separate each option.

Now the text is no more truncated but a min-height of 48px is applied. If the text of a mat-option take only one line the gap remains and there is no problem. But with 2 lines of more, the gap is no more and reading becomes more difficult

Reproduction

https://stackblitz.com/edit/angular-hjwez5?file=src/styles.scss

Expected Behavior

image

.mat-mdc-option {
  padding-top: 12px;
  padding-bottom: 12px;
  box-sizing: border-box;
}

Actual Behavior

image

Environment

  • Angular: 15.2.0
  • CDK/Material: 15.2.0
  • Browser(s): All
  • Operating System (e.g. Windows, macOS, Ubuntu): All
@MikaStark MikaStark added the needs triage This issue needs to be triaged by the team label Feb 27, 2023
@mmalerba mmalerba added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent regression This issue is related to a regression area: material/select and removed needs triage This issue needs to be triaged by the team labels May 8, 2023
@natechiarello
Copy link

mat-optgroup will probably need the same change within the same component. It can do with some padding top and bottom.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/select P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent regression This issue is related to a regression
3 participants