Skip to content

Commit

Permalink
Addresses placeholder text remaining visible on focus in Chrome
Browse files Browse the repository at this point in the history
The placeholder attribute in Chrome does not work to spec. This makes the text transparent on focus to work like Firefox, Safari, and the spec. Credit goes to @chadbaudoin for bringing this up in his pull request necolas#86 and this Chrome bug is further documented at http://code.google.com/p/chromium/issues/detail?id=106714  and my own test is at https://tinker.io/be2f2/1
  • Loading branch information
jonathantneal committed Mar 9, 2012
1 parent 79e2c16 commit 2691e7a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ input[type="search"]::-webkit-search-cancel-button {
color: #a9a9a9;
}

/*
* Addresses placeholder text remaining visible on focus in Chrome
*/

:focus::-webkit-input-placeholder {
color: transparent;
}

/*
* 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 2691e7a

Please sign in to comment.