Unify monospace font stack. Avoid potential sizing bug caused by weird browser behavior with font-family: monospace;

Problem: browsers implicitly and unexpectedly set the font-size to something around 13px with `font-family: monospace;`, but not with `font-family: monospace,monospace;`.
See:  http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/

Bug: T176636
Change-Id: Ied24a0cde7db4a6092d2cd7a6207d0a361424c3f
Related: T245568
Related: T245476
This commit is contained in:
AronDemian 2020-02-18 14:53:10 +01:00 committed by Aron Manning
parent ba8da65530
commit d70bd9d1ae
2 changed files with 8 additions and 1 deletions

View file

@ -50,7 +50,8 @@
"lib/codemirror/lib/codemirror.js"
],
"styles": [
"lib/codemirror/lib/codemirror.css"
"lib/codemirror/lib/codemirror.css",
"lib/codemirror-fixes.less"
]
},
"ext.CodeMirror.mode.mediawiki": {

View file

@ -0,0 +1,6 @@
.CodeMirror {
// Fix `font-family: monospace;` caused weird font sizing of browsers.
// Task: https://phabricator.wikimedia.org/T176636
// See: http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/
font-family: monospace, monospace;
}