trimox / angular-mdc-web

Angular wrapper for Material Design (Web) Components
https://trimox.github.io/angular-mdc-web
MIT License
517 stars 87 forks source link

[text-field] Overriding density hides label #2185

Closed KaranKapoorIon closed 4 years ago

KaranKapoorIon commented 4 years ago

Describe the bug Overriding the density on (default) mdc-text-field hides the label.

To Reproduce Steps to reproduce the behavior:

<mdc-text-field label="Username"></mdc-text-field>
.mdc-text-field {
    @include text-field.density(-4);
}

Expected behavior The label should be visible.

What Angular MDC version are you using? 5.1.1 (tested on canary as well)

What OS are you using?: Windows Server 2012

What browser(s) is this bug affecting?: Chrome

trimox commented 4 years ago

Hi @KaranKapoorIon Filled textfields will hide the floating label at certain densities. This behavior can be overridden by setting $text-field.minimum-height-for-filled-label: 40px

trimox commented 4 years ago

Closing.