Wikis using the MobileFrontend and/or MobileApp extensions (including all Wikimedia wikis) can define mobile CSS on the MediaWiki:Mobile.css page. To date, the apps have not incorporated up-to-date, site-specific mobile CSS. In commit 0db57d7 a copy of the English Wikipedia's Mobile.css was copied into the MobileApp repo as enwiki.less, and it remains there largely unchanged to this date, and that among other things is being bundled into the apps.
A wiki's MediaWiki:Mobile.css page is exposed via the MobileFrontend extension as the module mobile.site. The apps should be updated to take advantage of this. There are a couple of ways we could go about this:
- If the apps want to move toward a network-first CSS loading strategy, they could link the site-specific mobile CSS directly in the page view index.html by adding <link rel="stylesheet" href="/w/load.php?only=styles&modules=mobile.site">. This seems to me to be the best strategy.
- If the apps instead prefer to continue following a bundling strategy, then the site-specific CSS could be exposed as a new MCS endpoint to accompany the universal app CSS provided by the base CSS endpoint. In this case the apps could bundle a small additional stylesheet for each site, and dynamically change the one referenced from index.html at runtime when loading a page.
In either case we'll want to get rid of the existing enwiki.less. A patch to do that is here. After that is removed and before a further strategy is decided upon, the apps can continue bundling the (up-to-date) enwiki styles by requesting bundled styles specifically from en.wikipedia.org and adding mobile.site to the list of modules requested.