Created
April 5, 2016 10:24
-
-
Save jasonheecs/7b8a77f4c101f8e3ab52474b05a73236 to your computer and use it in GitHub Desktop.
Sass mixin to set the placeholder color of input elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the color of placeholder text in input fields | |
@mixin set-placeholder-color($color) { | |
// scss-lint:disable PseudoElement, VendorPrefix | |
::-webkit-input-placeholder { // WebKit, Blink, Edge | |
color: $color; | |
} | |
:-moz-placeholder { // Mozilla Firefox 4 to 18 | |
color: $color; | |
opacity: 1; | |
} | |
::-moz-placeholder { // Mozilla Firefox 19+ | |
color: $color; | |
opacity: 1; | |
} | |
:-ms-input-placeholder { // Internet Explorer 10-11 | |
color: $color; | |
} | |
:placeholder-shown { // Standard (https://drafts.csswg.org/selectors-4/#placeholder) | |
color: $color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment