Last active
November 3, 2016 14:57
-
-
Save Camwyn/4e8f44a71217cd9e7986c4f56f06ab97 to your computer and use it in GitHub Desktop.
Placeholder State
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
| /** | |
| * @alias placeholder-state | |
| * Styling placeholder text color states ( default, hover, focus ) | |
| * USE: @include placholder( #999, #999, #222 ); | |
| */ | |
| @mixin placeholder-state( $default: inherit, $hover: $default, $focus: $default ) { | |
| // You have to declare the -moz/-webkit separately in order for them to work | |
| &::-webkit-input-placeholder { | |
| color: $default; | |
| } | |
| &:-moz-placeholder { | |
| color: $default; | |
| } | |
| &:hover::-webkit-input-placeholder { | |
| color: $hover; | |
| } | |
| &:hover:-moz-placeholder { | |
| color: $hover; | |
| } | |
| &:focus::-webkit-input-placeholder { | |
| color: $focus; | |
| } | |
| &:focus:-moz-placeholder { | |
| color: $focus; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment