Xaver Fleer
Xaver Fleer

Reputation: 465

Spec for not-inheriting certain font settings in textarea

This is a wonderful question about why styles do not get inherited in form fields. This is a wonderful answer that explains "Certain controls are not defaulted to inherit font settings."

Is there a specification about this? "Certain controls" seems vague to me.

I checked

Upvotes: 0

Views: 89

Answers (1)

Temani Afif
Temani Afif

Reputation: 272891

The answer to your question is pretty simple and it's not related to the specification. If you take the example of a textarea inside Google Chrome and inspect the element you will get the following:

enter image description here

The browser is applying a default font-family (and many other properties) so the inherit rule no more apply.

Now if you want to know how these default style are defined you need to consider each browser and its implementation since this is out of the scope of the CSS specification.

Upvotes: 1

Related Questions