npm.io
1.0.0 • Published 10 years ago

webkit-autofill

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

webkit-autofill

A simple scss file with mixins to styling autofill. More info about autofill in WebKit browsers: CSS-Tricks

Install

In your project install a package:

npm install webkit-autofill

Usage

First, import autofill.scss file from node_modules to your .scss / .sass file in project. For example:

@import '../../node_modules/webkit-autofill/autofill'

Then you can use mixins from autofill.scss. For example:

input:-webkit-autofill {
  @include backgroundColorAutoFill(#2196F3);
}

Examples (examples for .scss files)

A default style for autofill in Chrome with examples login data:

Default style

disableAutoFill

Default style

input:-webkit-autofill {
  @include disableAutoFill;
}
backgroundColorAutoFill(color)

Default style

input:-webkit-autofill {
  ...
  @include backgroundColorAutoFill(#2196F3);
}
textColorAutoFill(color)

Default style

input:-webkit-autofill {
  ...
  @include textColorAutoFill(#FFFFFF);
}
hoverBackgroundColorAutoFill(color)

Default style

input:-webkit-autofill {
  ...
  @include hoverBackgroundColorAutoFill(#FF5722);
}
hoverTextColorAutoFill(color)

Default style

input:-webkit-autofill {
  ...
  @include hoverTextColorAutoFill(#212121);
}

Keywords