Created
September 10, 2015 06:05
-
-
Save mistergraphx/5e1b97bef0c1ea5ffbf4 to your computer and use it in GitHub Desktop.
SitePoint : Form theming with Sass : From http://www.sitepoint.com/theming-form-elements-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
$pseudo-phprefix: "::-webkit-input-placeholder" "::-moz-placeholder" ":-ms-input-placeholder" "::placeholder"; | |
$ph-styles: ( | |
font-family: sans-serif, | |
font-size: medium, | |
font-style: normal, | |
font-weight: normal, | |
color: inherit, | |
letter-spacing : normal, | |
line-height: normal, | |
text-align: inherit, | |
text-decoration: inherit, | |
padding: 0 | |
); | |
@mixin placeholder-theme($styles) { | |
@each $pseudo in $pseudo-phprefix { | |
@at-root #{&}#{$pseudo} { | |
@each $key, $value in $styles { | |
#{$key}: #{$value}; | |
} | |
} | |
} | |
} | |
@mixin placeholder { | |
@each $pseudo in $pseudo-phprefix { | |
@at-root #{&}#{$pseudo} { | |
@content | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment