Placeholder Shown

Examples

Simply call the mixin and write your style rules.

input{
  @include placeholder-shown{
    background-color: yellow;
  }
}
//CSS Output
input:placeholder-shown {
  background-color: yellow;
}

When you call the mixin at the root of your stylesheet it will target all the <input> and <textarea> elements.

@include placeholder-shown{
  background-color: yellow;
}
//CSS Output
:placeholder-shown {
  background-color: yellow;
}