Styling placeholder texts
Posted by: QuirksBlog,
on 03 Dec 2015 |
View original | Bookmarked: 0 time(s)
A quick note on styling placeholder texts. Although it’s very easy, it turns out that both MDN and the usual go-to CSS Tricks article leave out one important bit of data: when setting the color you should add opacity: 1 for Firefox.UnstyledMy task was to make sure that text in input fields, including placeholder text, uses exactly the same font and text colour as regular text.Here is the unstyled test; first a reference paragraph, then a form field with a value, then a form field with a placeholder....