Artisan72 Artisan72 - 3 months ago 10
CSS Question

"font-family: monospace, monospace"

I'm just curious, in

normalize.css
, the monospace font rules contain

font-family: monospace, monospace;


Is there a difference to

font-family: monospace;


? There must be a reason for using that. Maybe it's a workaround for the behaviour of some browsers?

Answer

You are right. The font-family: monospace, monospace; declaration is a simple hack/workaround for some browsers which tend to reduce the font size of monospace fonts.

More info on this Github issue: https://github.com/necolas/normalize.css/issues/519#issuecomment-197131966

Comments