Skip to content

Commit

Permalink
Add placeholder color normalization
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonathantneal committed Mar 9, 2012
1 parent 664a7a7 commit 49392e9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 49392e9

Please sign in to comment.