-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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(form-field): mat-label disappears when density < -1 #26579
Comments
Adding more information: As mentioned by @eLarocque, the issue only happens to You can check this issue in this URL: https://angular-material-density.netlify.app/ EnvironmentAngular: 15.1.4 |
Nobody cares about this bug it seems 😄 very annoying when you need to customize the large application. |
Any plans to fix it? |
From dev comments: |
I have compile errors with -5, but "minimum" works. |
There are a couple of hacks. In styles.scss before the imports add Or you can add a global style |
This deserves more attention from the angular team because migrating to v15 increases the input sizes so much that we would need to set the density to |
Do we have a solution for this? |
The solution proposed by @NachmanBerkowitz worked for me, by adding
When not setting the |
@JoukeD, I guess you would agree the solution you proposed is just a temporal fix and the angular team should still fix the issue. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
Hi,
There seems to be an issue where the mat-labels disappear when the density of form-field is set to lower than -1. I don't think this is as designed...
Reproduction
Steps to reproduce:
@include mat.form-field-density(-2);
notice the labels do not appear. (Their css is set as "display:none;")
Demo: https://stackblitz.com/edit/angular-wvlwej
In the stackblitz, you can see that the labels appear fine when density is set at >= -1, but anything lower and the label is hidden.
Expected Behavior
The labels should be visible
Actual Behavior
The labels are not visible
Environment
The text was updated successfully, but these errors were encountered: