Add placeholder color normalization

The browser-defined style for placeholder text color is overwritten by style for input elements in Firefox. Adding :-moz-placeholder style overrides that, bringing Firefox inline with other browsers.

@mathiasbynens made a test case for this @ https://tinker.io/be2f2

This change improves consistency of placeholder style between Chrome, Safari, and Firefox browsers.
This commit is contained in:
Jonathan Neal 2012-03-09 09:03:54 -08:00
parent 664a7a760e
commit 49392e9df2

14
normalize.css vendored
View File

@ -468,6 +468,20 @@ input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
/*
* Improves consistency of placeholder style between Chrome, Safari, and Firefox browsers
*/
::-webkit-input-placeholder
{
color: #AAA;
}
:-moz-placeholder
{
color: #AAA;
}
/*
* Removes inner padding and border in FF3+
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/