Is there a way in sass to chain up selectors like this:
input {
&::-webkit-input-placeholder,
&:-moz-placeholder,
&::-moz-placeholder,
&:-ms-input-placeholder {
color: red;
}
}
Is there a way in sass to chain up selectors like this:
input {
&::-webkit-input-placeholder,
&:-moz-placeholder,
&::-moz-placeholder,
&:-ms-input-placeholder {
color: red;
}
}
With these special vendor-specific pseudo selectors, I've found putting them all together on one line does not result in them working very well cross-browser. I think the best optimization you can hope for then is something like this:
@mixin placeholderstyle() {
color: red;
}
input::-webkit-input-placeholder {
@include placeholderstyle()
}
input:-moz-placeholder {
@include placeholderstyle()
}
input::-moz-placeholder {
@include placeholderstyle()
}
input:-ms-input-placeholder {
@include placeholderstyle()
}