Last active
November 18, 2015 04:00
-
-
Save ozinepank/429abd146ef92742389f to your computer and use it in GitHub Desktop.
Using Mixing pseudo palceholder (SASS)
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
@mixin psuedo-placeholder($color-placeholder) { | |
&::-webkit-input-placeholder { | |
color: $color-placeholder; | |
@include transition-color; | |
} | |
&:-moz-placeholder { /* Firefox 18- */ | |
color: $color-placeholder; | |
@include transition-color; | |
} | |
&::-moz-placeholder { /* Firefox 19+ */ | |
color: $color-placeholder; | |
@include transition-color; | |
} | |
&:-ms-input-placeholder { | |
color: $color-placeholder; | |
@include transition-color; | |
} | |
&:focus { | |
&::-webkit-input-placeholder { | |
color: transparent; | |
} | |
&:-moz-placeholder { /* Firefox 18- */ | |
color: transparent; | |
} | |
&::-moz-placeholder { /* Firefox 19+ */ | |
color: transparent; | |
} | |
&:-ms-input-placeholder { | |
color: transparent; | |
} | |
} | |
} | |
// Using | |
.input-form input { | |
include psuedo-placeholder($color); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment