This is an issue in Timeless skin (the rest use miniature fonts anyway and Minerva overrides the font-size in <p> tags) or any skin with non-default browser font-size.
===== Steps to Reproduce:
1. WTE2010: https://www.mediawiki.org/wiki/2017_wikitext_editor?action=editsource&useskin=timeless
1. [[ https://www.mediawiki.org/wiki/Special:Preferences#mw-prefsection-betafeatures | enable ]] "New wikitext mode"
1. WTE2017: https://www.mediawiki.org/wiki/2017_wikitext_editor?veaction=editsource&useskin=timeless
===== Actual Results:
Hard-to-read 13px font-size.
===== Expected Results:
Readable 15.2px font-size (inherited from the skin) for sans and serif editfont.
About 10% smaller font-size for monospace fonts: the same text is rendered in about the same area at ca. 90% font-size as with serif and sans fonts.
== Screenshots
Good:
| {F31621696} | {F31621695}
Bad vs Good:
| {F31621703} | {F31621704}
== Details
The offending css rule is (loaded into a <style> tag):
```
.mw-editfont-monospace, .mw-editfont-sans-serif, .mw-editfont-serif {
font-size: 13px;
}
```
The patch that added it: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/396005/5/resources/src/mediawiki/mediawiki.editfont.css
The cause: {T182320}
`textarea` elements set an inconsistent font-size in old browsers. (Not in today's Chrome, idk about others)
> For historical reasons we've allowed inconsistent browser-default styles to apply to textarea#wpTextbox1
==== Solution
1. 2017WTE has no `textarea` element (only divs). The selector should be more specific: `.textarea.mw-editfont-*`
2. Just reset the `textarea` element's font-size to the parent's: `font-size: inherit;` That will be the skin's chosen default.
3. The [[ https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CodeMirror/+/572876 | second patch ]] addresses an error ([[ #5892848 | details ]]) in CodeMirror that was revealed by this change.