Skip to content

Instantly share code, notes, and snippets.

@Manoz
Created May 16, 2017 13:00
Show Gist options
  • Save Manoz/cd25b1128df1867211424e4c7dec73ee to your computer and use it in GitHub Desktop.
Save Manoz/cd25b1128df1867211424e4c7dec73ee to your computer and use it in GitHub Desktop.
SASS/LESS Placeholders
// More infos: https://css-tricks.com/almanac/selectors/p/placeholder/
input {
// Chrome/Safari/Opera
&::-webkit-input-placeholder {
// Your styles
}
// Firefox 19+
&::-moz-placeholder {
opacity: 1; // Fix FF behavior
// Your styles
}
// Firefox 18-
&:-moz-placeholder {
opacity: 1; // Fix FF behavior
// Your styles
}
// IE 10+
&:-ms-input-placeholder {
// Your styles
}
}
@Manoz
Copy link
Author

Manoz commented May 16, 2017

Note that Firefox 18- and IE 10+ have only one : character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment