I need to change the opacity of the placeholder when input in focus but not to achieve in sass
Html
<input type="text" name="search_cursos" id="search_cursos" placeholder="Procure a vaga que deseja" class="procurarvaga">
My scss
input.procurarvaga{
text-align: center;
&:focus{
@include placeholder {
@include opacity(.2);
}
}
}
Mixins
@mixin opacity($opacity) {
opacity: $opacity;
// IE8 filter
$opacity-ie: ($opacity * 100);
filter: alpha(opacity=$opacity-ie);
}
@mixin placeholder {
::-webkit-input-placeholder {@content}
:-moz-placeholder {@content}
::-moz-placeholder {@content}
:-ms-input-placeholder {@content}
}
My code link
Here with css works the most I can not put to work with sass link