Skip to content

mwc-textfield label clipped when font-size changed #2840

@andreinocenti

Description

@andreinocenti

Describe the bug

When the --mdc-typography-subtitle1-font-size: is changed the input label is clipped when the textfield is "filled" or with focus.

When the field is not focused or not filled
image

When the field is focused or filled.
image

I have tried the textfield.layout() with several different approachs. I tried set it with timeout or when the field is focused and no lucky.

To Reproduce

Set the css below to change the mwc-textfield font-size, it was too big with the new font that i must use.

mwc-textfield{
    --mdc-typography-font-family: "Comfortaa";
    --mdc-typography-subtitle1-font-size: "14px";
}

Expected behavior

To show the label without clip the text

Browser Version (please complete the following information):

  • OS: Windows 10
  • Browser chrome

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions