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

Input autocomplete styling doesn't fill entire form field #15025

Closed
terrybrash opened this issue Jan 30, 2019 · 3 comments
Closed

Input autocomplete styling doesn't fill entire form field #15025

terrybrash opened this issue Jan 30, 2019 · 3 comments
Assignees
Labels
area: material/form-field area: material/input blocked This issue is blocked by some external factor, such as a prerequisite PR material spec Issue related to the Material Design spec https://material.io/design/ P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@terrybrash
Copy link

terrybrash commented Jan 30, 2019

What is the expected behavior?

When using autocomplete in matInput, the browser's autocomplete styling should fill the entire form field.
image

What is the current behavior?

image

What are the steps to reproduce?

https://angular-material2-issue-on2neb.stackblitz.io

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cli: 7.2.1
@angular/material: 7.3.0
typescript: 3.2.2
OS: Windows 10
Browser: Google Chrome 71

Is there anything else we should know?

material-components-web had some similar issues with autocomplete styling which were fixed in this pull request.

@mmalerba
Copy link
Contributor

mmalerba commented Feb 6, 2019

I don't actually see anything in the spec that mentions what the autofill state should be, but we do have some CDK utilities that can help with detecting autofill and applying custom styles

@mmalerba mmalerba added needs triage This issue needs to be triaged by the team material spec Issue related to the Material Design spec https://material.io/design/ blocked This issue is blocked by some external factor, such as a prerequisite PR P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels May 20, 2020
@LeonardoRochaInacio
Copy link

LeonardoRochaInacio commented Jul 24, 2020

I had the same problem, what I did to solve was insert

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000s;
-webkit-text-fill-color: #fff !important;
}

on my custom theme scss. it will make your auto fill background transparent.

hope this can help u

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/form-field area: material/input blocked This issue is blocked by some external factor, such as a prerequisite PR material spec Issue related to the Material Design spec https://material.io/design/ P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

4 participants