Why <input> and <textarea> have different fonts?
I'm using Firefox 32.0.3 under Kubuntu 14.04. This simple document shows the problem:
<html> <body> <p>Test</p> <p><code>Test</code></p> <p><input value="Test"></input></p> <p><textarea></textarea></p> </body> </html>
I have set "font.size.fixed.x-unicode" and "font.size.fixed.x-western" to "16", so that the "Test" in <code> shows at the same font size as the text. If I write something in the <textarea>, it shows at the same font size too. But the <input> has a smaller font size, and a different font, actually.
With the element inspector I can see that everything uses DejaVu fonts (I'm not sure why, I don't see where I have set this), but the <input> uses Ubuntu (which is the font set in the KDE preferences).
How can I make sure everything uses the same font and size?
Изменено
Все ответы (4)
Hi Jellby, Unfortunately there is a wiki mark up in the forums that prevents some html from rendering properly in a post. I would be happy to troubleshoot if you have a url/thimble or jsfiddle example we can collaborate on.
I also recommend either opening a webcompat.com bug with an example or a stackoverflow.com question for a faster response.
Code uses font-family: -moz-fixed;
resource://gre-resources/html.css
Input uses font-family: -moz-use-system-font; font-size: medium;
resource://gre-resources/forms.css
Textarea uses font-family: -moz-fixed; font-size: medium;
resource://gre-resources/forms.css
@guigs2 I didn't intend the code to be rendered in the forum, but if you want a live version, maybe this works: http://jsfiddle.net/k87pLhjw/
Изменено
@cor-el Is that the intended behaviour? I can see the point both in using the system font and the fixed font, but I don't see why input and textarea should have different choices. Could we count this as a bug? In that case, should I report it?