I want to create a placeholder mixin as follows. However, this fails to compile in LESS version 1.7.0.
.placeholder(...) {
::-webkit-input-placeholder: @arguments;
:-moz-placeholder: @arguments;
::-moz-placeholder: @arguments;
:-ms-input-placeholder: @arguments;
}
Mixin allows for any placeholder css rules.
.placeholder(@rules) {
&::-webkit-input-placeholder {
@rules();
}
&:-moz-placeholder {
@rules();
}
&::-moz-placeholder {
@rules();
}
&:-ms-input-placeholder {
@rules();
}
}
Example usage:
.placeholder({
color: #0000FF;
text-transform: uppercase;
});