Commit
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
There are no files selected for viewing
4 comments
on commit 49392e9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test case linked to in the commit is for a different issue.
I made a test case showing how this change doesn't address the core Firefox bug
https://tinker.io/e34a2
Any selector with a higher specificity will cause the bug to resurface.
So this change needs to go and I think we should consider reverting the last 5 commits because the current Safari/WebKit placeholder-focus behaviour looks set to become the norm: https://bugzilla.mozilla.org/show_bug.cgi?id=673873 and is allowed in the spec: http://lists.w3.org/Archives/Public/public-html-diffs/2011Oct/0174.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the firefox placeholder color (being overwritten by the input color)? That's a bug. Should we fix that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I'm talking about too. I've already shown, in the above test case, that we can't fix that Firefox bug. It's something for them to fix in the browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't have nice things.
Isn’t this already the default color in WebKit? Or has this declaration block been added purely for clarity?
Update: Never mind, WebKit uses
darkGray
which converts to#a9a9a9
. Gecko usesGrayText
(openresource://gre-resources/forms.css
in Firefox to confirm this) which is an OS-specific value. (On OS X Lion, it seems to map to#7f7f7f
.)