Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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?

like image 326
Artisan72 Avatar asked Aug 05 '16 04:08

Artisan72


People also ask

What font family is monospace?

The term modern can be used for a fixed-pitch generic font family name, which is used in OpenDocument format (ISO/IEC 26300:2006) and Rich Text Format. Examples of monospaced fonts include Courier, Lucida Console, Menlo, Monaco, Consolas, Inconsolata and Source Code Pro.

What is an example of a monospaced font?

The system fonts Courier, Menlo, and Consolas are examples of monospaced fonts , so named because every character is the same width. When the characters vary in width, the font is called proportional .

What is the most popular monospace font?

Fira Code (popular choice) Undoubtably the most commonly used monospace font ever, Fira Code is a spin on Fira Mono. The difference is that Fira Code contains code-specific ligatures (this is when two graphemes/letters are joined together as a single glyph).


1 Answers

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

like image 111
Kyle O Avatar answered Oct 06 '22 09:10

Kyle O