Parent task: {T363845}
Having started with T312933 and T312970 related to #wikieditor, 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:
| {F35320488, width=250} | {F35320491, width=350} | {F35320496, width=250} | {F35320500, width=150, float} {F35320502, width=150, float} |
| * #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 [[https://css-tricks.com/users-do-change-font-size/|some research]], more than 3% of users have non-default browser font size.
Related task: {T27257}
# 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)
** ~~[[https://gerrit.wikimedia.org/g/mediawiki/core/+/32da948e2bbe3e301267afe708765f93f39a906b/resources/src/mediawiki.content.json.less|resources/src/mediawiki.content.json.less]] (1 matches)~~
** ~~[[https://gerrit.wikimedia.org/g/mediawiki/core/+/32da948e2bbe3e301267afe708765f93f39a906b/resources/src/mediawiki.debug/debug.less|resources/src/mediawiki.debug/debug.less]] (4 matches)~~
** ~~[[https://gerrit.wikimedia.org/g/mediawiki/core/+/32da948e2bbe3e301267afe708765f93f39a906b/resources/src/mediawiki.diff.styles/diff.less|resources/src/mediawiki.diff.styles/diff.less]] (1 matches)~~
** [[https://gerrit.wikimedia.org/g/mediawiki/core/+/32da948e2bbe3e301267afe708765f93f39a906b/resources/src/mediawiki.editfont.less|resources/src/mediawiki.editfont.less]] (2 matches)
Wikimedia deployed extensions/projects
** See {T385857}
Wikimedia deployed skins
** See {T385858}
# Open questions
* How should icons scale with different font sizes? (follow up work for T365731 )