Created
March 24, 2017 01:59
-
-
Save satanworker/da36ee8a5dde307bf726bc62f13a39b2 to your computer and use it in GitHub Desktop.
placeholder mixin
This file contains 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 optional-at-root($sel) { | |
@at-root #{if(not &, $sel, selector-append(&, $sel))} { | |
@content; | |
} | |
} | |
@mixin placeholder { | |
@include optional-at-root('::-webkit-input-placeholder') { | |
@content; | |
} | |
@include optional-at-root(':-moz-placeholder') { | |
@content; | |
} | |
@include optional-at-root('::-moz-placeholder') { | |
@content; | |
} | |
@include optional-at-root(':-ms-input-placeholder') { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment