I'm styling the placeholder text in my <input>
tags, and I've discovered some odd behavior.
If I simply put the following, Chrome renders the placeholder text correctly:
:focus::-webkit-input-placeholder {
position: absolute;
left: -9000px;
}
However, if I try to include for multiple browsers in the same line, it doesn't display at all:
:focus::-webkit-input-placeholder, :focus:-moz-placeholder, :focus::-moz-placeholder, :focus:-ms-input-placeholder {
position: absolute;
left: -9000px;
}
I'd ideally like to have my SASS look like the below, but I for whatever reason cannot have the different selectors separated by commas.
:focus {
outline: none;
&::-webkit-input-placeholder, &:-moz-placeholder, &::-moz-placeholder, &:-ms-input-placeholder {
// Hide placeholder text on focus
position: absolute;
left: -9000px;
}
}
Is there any SASS syntax to force it to process each selector with its own block, like the below sample?
:focus::-webkit-input-placeholder {
position: absolute;
left: -9000px;
}
:focus:-moz-placeholder {
position: absolute;
left: -9000px;
}
// etc.