Skip to content

Instantly share code, notes, and snippets.

@stokito
Last active January 4, 2018 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stokito/1c63cfb787cf01375e392f40a630f128 to your computer and use it in GitHub Desktop.
Save stokito/1c63cfb787cf01375e392f40a630f128 to your computer and use it in GitHub Desktop.
/* BEGIN OF RESPONSIVE PLACEHOLDER CLASS */
/**
placeholder-xs class to show placeholder with field name for mobile phones but to hide and show label instead on larger screens.
Media for bigger devices than phones (tablet, laptops larger than 767px)
*/
@media (min-width: 768px) {
.placeholder-xs::-webkit-input-placeholder { /* Chrome */
color: transparent;
}
.placeholder-xs:-ms-input-placeholder { /* IE 10+ */
color: transparent;
}
.placeholder-xs::-moz-placeholder { /* Firefox 19+ */
color: transparent;
}
.placeholder-xs:-moz-placeholder { /* Firefox 4 - 18 */
color: transparent;
}
}
/* END OF RESPONSIVE PLACEHOLDER CLASS */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment