MediaWiki:Mobile.css was added to MobileFrontend as a replacement for MediaWiki:Common.css
Many projects use MediaWiki:Mobile.css. However many of the rules there are redundant and necessary on mobile domain given the mobile HTML is different from desktop and many of these wiki pages result from copying and pasting from Common.css. Mobile also provides opinionated rules on how horizontal lists should render. Many of the rules only apply to a handful of pages. For instance the hlist template is not needed on all pages yet CSS for it is loaded everywhere.
As a workaround (which quite frankly is a bad workaround) we load this CSS via JavaScript (See T190083)
Now that TemplateStyles exists there is no reason to use MediaWiki:Mobile.css other than 1) convenience (e.g. it's easier to add a class hlist to an element then to find and use a template) and 2) style the UI e.g. change the header color - Minerva doesn't want support this right now and if we do want to support that better more scoped solutions exist.
Gadgets provide a better solution for scripting than Mobile.js
An additional issue here is that MediaWiki:Mobile.css is loaded for all skins on the mobile domain commonly used as if it is MediaWiki:Minerva.css which means if T173527 is ever resolved, other skins will look very broken. For this reason, MediaWiki:Minerva.css should be restored to support skin-specific customizations
What about MediaWiki:Minerva.css
To make the mobile site behave more consistently with the desktop site, in T359488 we made MediaWiki:Minerva.css render blocking. Since MediaWiki:Mobile.css is poorly documented, not render blocking and often used inappropriately we will sunset its usage.
While we could run a bot to move Mobile.css to Minerva.css it is a good opportunity to provide better guidance for communities using it in damaging ways.
As part of this move we are likely to expect a performance hit on certain projects which have large Mobile.css pages.
Proposal
Proposal is as follows
- Mitigate performance problems that might arise from communities migrating CSS from Mobile.css to Minerva.css - provide better guidelines on how to use.
- Migrate suitable code to MediaWiki:Minerva.css (we should not migrate all styles here!)
- Blocking problems in TemplateStyles that are blocking wider use of template styles are fixed T162379
- Community is notified and supported with moving styles to appropriate stylesheets shipped with TemplateStyles or MediaWiki:Minerva.css
- MediaWiki:Mobile.css and Mobile.js is removed from the site and associated configuration wgMFSiteStylesRenderBlocking.