Normalize.css: the monospace font-family

Created on 16 Apr 2016  路  2Comments  路  Source: necolas/normalize.css

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
pre,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

two monospace

Most helpful comment

@marvin1023, thanks for looking at the code. It鈥檚 almost a tradition for certain developers to ask about this. Don鈥檛 feel too bad; and take this opportunity to look over our documentation. This gets asked every so often. The duplication of monospace is intentional, and fixes font sizing on pre-formatted text.

All 2 comments

The duplication of monospace is intentional.

https://github.com/necolas/normalize.css#pre-code-kbd-samp

@marvin1023, thanks for looking at the code. It鈥檚 almost a tradition for certain developers to ask about this. Don鈥檛 feel too bad; and take this opportunity to look over our documentation. This gets asked every so often. The duplication of monospace is intentional, and fixes font sizing on pre-formatted text.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

visicode picture visicode  路  6Comments

ibrahemMR picture ibrahemMR  路  3Comments

gitowiec picture gitowiec  路  6Comments

GregBoss picture GregBoss  路  5Comments

slim-hmidi picture slim-hmidi  路  3Comments