I have a <textarea>
inside the <body>
. I have applied the following CSS rules:
body {
font-family: sans-serif;
font-size: 16px;
}
textarea {
font-family: monospace;
/* font-family: "Courier New", monospace; */
}
Here's what it looks like in Firefox 31.0:
You can see the result in this JSFiddle. By inspecting the <textarea>
with Firebug we can see it does not inherit the <body>
's font-size
, but sets it instead to 13px
. (0.8em
?)
However, if I uncomment the second font-family
declaration, strange things happen.
Now the <textarea>
seems to inherit <body>
's font-size
, even though I didn't change it manually.
Finally, in both cases, Firebug shows that the font-size: 16px
of <body>
is overridden, even though I didn't find any browser stylesheets there that override it.
This does not seem to occur in Internet Explorer 11 or Chrome 34.
The problem is easily fixed by setting font-size: 0.8em
to all <textarea>
s, but the cause bothers me a bit.
What may be the cause of this? A bug in Firefox, possibly?