MediaWiki recommends that the $wgLogos['1x'] is 135px wide, but does not enforce this, and even in Wikimedia production there’s a wide variety of actual sizes, ranging from 90px (trwikiquote) to 157px (arbcom_enwiki, though overridden there via common.css). However, HD logos assume that base width, and don’t scale correctly if the 1x logo has a different width. The following CSS rule is hard-coded in ResourceLoaderSkinModule::getStyles():
background-size: 135px auto;
If the 1x logo is less wide than 135px, then the logo will become larger than it should when you zoom from 140% to 150%; if it’s wider than 135px, the logo will not become as large as it should, or even shrink at that zoom threshold. (That’s in Firefox, at least – Chromium has different zoom steps, and in the transition from 125% to 150% the change isn’t as visible.)
This command, run in operations/mediawiki-config.git, finds all the logos that have a nonstandard width and also a 2x variant:
find static/images/project-logos/ -type f -name '*.png' -\( -not -\( -name '*-1.5x.png' -or -name '*-2x.png' \) \) -exec identify {} + 2>/dev/null | awk '$3 !~ /^135x/' | grep -Ff<(find static/images/project-logos/ -type f -name '*-2x.png' | sed 's/-2x\.png/.png/') | awk '{ print $3, $1 }' | sort -n
The current output can be found at P9040; kbdwiki is one example where the logo jumps up in size as you zoom from 140% to 150%, whereas on wikidatawiki, it shrinks somewhat (see T230120#5464541 for screenshots). Another significant example is pawikisource, where the HD logo even gets clipped:
Plan
- All deployed Wikimedia sites will provide an SVG for wgLogos['icon']
- Going forward we will move away from the 1x,2x and svg logos. Notably the existing skins that make use of 1x e.g vector classic, Monobook, Timeless will stop using them, instead making use of the icon, wordmark, tagline instead.
- All 1x, svg and 2x definitions will be removed.