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(MatFormField):MatFormField suffix and prefix are NOT aligned with floating placeholder - even on DEMO PAGE #21846

Open
Antoniossss opened this issue Feb 9, 2021 · 2 comments
Assignees
Labels
area: material/form-field P4 A relatively minor issue that is not relevant to core functions

Comments

@Antoniossss
Copy link

Reproduction

got to https://material.angular.io/components/form-field/overview#prefix--suffix

Prefix and suffix of second example is not aligned with floating placeholder (when it is not floating)

Expected Behavior

Everything to be alligned

Actual Behavior

image

Environment

Angular demo page for 11.1.1

@Antoniossss Antoniossss added the needs triage This issue needs to be triaged by the team label Feb 9, 2021
@crisbeto
Copy link
Member

I think that in general the new form field appearances aren't really made for text-based prefixes. We should either remove those examples or switch them to icons.

@crisbeto crisbeto added area: material/form-field docs This issue is related to documentation P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team labels Feb 15, 2021
annieyw pushed a commit that referenced this issue May 3, 2021
annieyw pushed a commit that referenced this issue May 3, 2021
@annieyw annieyw self-assigned this May 24, 2021
@mmalerba mmalerba removed the docs This issue is related to documentation label May 25, 2021
@mmalerba
Copy link
Contributor

Thanks @annieyw for fixing the example! I'm leaving this bug open because we should be able to do more to improve this experience in the MDC version of the form-field. In that version we actually differentiate between text and icon prefix/suffixes so we can treat them differently. I think the right thing to do for the MDC version is hide the text prefix/suffix when the label is not floating (this is what MDC does in their own demos)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/form-field P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

4 participants