Open RhodesPeter opened 7 years ago
It looks like the browser support for styling placeholders in general isn't too bad (http://caniuse.com/#search=%3A%3Aplaceholder), but you need to include more prefixes than just the webkit one.
If you add :-ms-input-placeholder
and ::-ms-input-placeholder
you'll also support IE and Edge.
Thanks guys - I'd added the others but they seem not to work when you reference them but separating them with commas so I'd removed and forgotten to add again. Will do now!
Yeah you can't comma separate browser prefixed properties because of the way CSS is parsed — if a browser hits a declaration it doesn't understand (e.g. Chrome trying to read -ms-
) it will just stop reading that block of code entirely
When I looked into ::-webkit-input-placeholder to see what it does, I found this:
Is there another way that you can achieve the same effect which is compatible across browsers?