mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-23 22:03:28 +00:00
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:
parent
ba8da65530
commit
d70bd9d1ae
|
@ -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": {
|
||||
|
|
6
resources/lib/codemirror-fixes.less
Normal file
6
resources/lib/codemirror-fixes.less
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue