From 49392e9df27b7036609f56861679e8cf9c0ea264 Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Fri, 9 Mar 2012 09:03:54 -0800 Subject: [PATCH] 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. --- normalize.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/normalize.css b/normalize.css index f056d58..a23b9aa 100644 --- a/normalize.css +++ b/normalize.css @@ -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/