Skip to content

Instantly share code, notes, and snippets.

@wiseoldman
Created May 29, 2018 09:48
Show Gist options
  • Save wiseoldman/a2d18dbc3ac80e120391bc89c75f18eb to your computer and use it in GitHub Desktop.
Save wiseoldman/a2d18dbc3ac80e120391bc89c75f18eb to your computer and use it in GitHub Desktop.
[Input mixins] Mixins for input fields #scss
@mixin placeholderColor($color) {
&:-moz-placeholder {
color: $color;
}
&:-ms-input-placeholder {
color: $color;
}
&::-moz-placeholder {
color: $color;
}
&::-webkit-input-placeholder {
color: $color;
}
}
@mixin hidePlaceholder() {
&:-moz-placeholder {
color: rgba(0,0,0,0);
}
&:-ms-input-placeholder {
color: rgba(0,0,0,0);
}
&::-moz-placeholder {
color: rgba(0,0,0,0);
}
&::-webkit-input-placeholder {
color: rgba(0,0,0,0);
}
}
@mixin autocompleteColor($background, $color) {
&:-webkit-autofill {
-webkit-box-shadow: 0 0 0 30px $background inset;
-webkit-text-fill-color: $color;
caret-color: $color;
font-style: italic;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment