Parent task: T363845: [EPIC] Typography scale and font sizing
Having started with T312933 and T312970 related to WikiEditor (2010), I discovered that quite many MediaWiki parts and extensions don't respect the default browser font size, setting an absolute font-size in px instead of relative in em/rem. I'm not sure whether I should create an individual task for every finding because there's quite a few of them, their list is likely to grow, and they are typical.
Here's what I stumbled upon as of now:
| * Page-Previews have a fixed font-size of 14px. Here's how they look in Firefox with 20px as the default font size. The width of the popup in various orientations is also fixed (450px, 320px). | Diffs are rigidly set to 13px. That's their look. | #siteSub is strictly 12.8px. Here's how it looks like. | line-height in .sidebar-toc is exactly 18px. It may be not obvious what's so bad but here's the difference with 16px as the default size.padding-left of subsections on the same screenshot is 8px (IMHO, difficult to see even with standard settings). |
According to some research, more than 3% of users have non-default browser font size.
Related task: T27257: Don't specify font-size in pixels for accessibility
Hardcoded font-size audit
The following query in codesearch identified font-sizes set in px (font-size:.*px;) in Wikimedia maintained repos:
https://codesearch.wmcloud.org/deployed/?q=font-size%3A.*px%3B&files=.less&excludeFiles=&repos=
- MediaWiki core (6 files)
resources/src/mediawiki.content.json.less (1 matches)resources/src/mediawiki.debug/debug.less (4 matches)resources/src/mediawiki.diff.styles/diff.less (1 matches)resources/src/mediawiki.editfont.less (2 matches)
Wikimedia deployed extensions/projects
Wikimedia deployed skins
Open questions
- How should icons scale with different font sizes? (follow up work for T365731 )




