react-native-web icon indicating copy to clipboard operation
react-native-web copied to clipboard

Support autofill styles in webkit browser

Open hyochan opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe.

I've tried to find a way to style autocomplete style in TextInput and couldn't find any resource about it.

7ssMpmLIRV

In, dark mode it looks a bit ugly so I wanted to know how to customize this.

In react, we could control these styles followed by the article.

Describe a solution you'd like

I'd like to extract extra styles just for the web to handle this instead of putting it in style props which are not official types in react-native. webKitAutoFillStyle would be great.

hyochan avatar Feb 05 '21 12:02 hyochan

Please can you fork this template and create a test case for the request that demonstrates what is shown in the gif? https://codesandbox.io/s/6lx6ql1w5r

necolas avatar Feb 05 '21 18:02 necolas

I'd rather remove the webkit-specific styles the browser is adding instead of exposing them to user-space

necolas avatar Feb 05 '21 18:02 necolas

Something like this is needed to override the UA styles:

input {
  --bg: lightblue;
  --fs: 16px;
  font-size: var(--fs);
  background-color: var(--bg);
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
}

input:-webkit-autofill::first-line {
  font-size: var(--fs);
}

necolas avatar Feb 05 '21 19:02 necolas

This issue is being closed because the requested information has not been provided.

github-actions[bot] avatar Apr 13 '23 17:04 github-actions[bot]