cssmonospacenormalize-css

"font-family: monospace, monospace"


In normalize.css, the monospace font rules contain

font-family: monospace, monospace;

Is this different to

font-family: monospace;

?

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


Solution

  • 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