From T254848#6315804
Timeless, Minerva and Vector (when configured) add a viewport to the article:
https://github.com/wikimedia/mediawiki-skins-Timeless/blob/master/includes/SkinTimeless.php#L23
https://github.com/wikimedia/Vector/blob/c7e9719b9b39a06990f7524bf0f0596c9248c368/includes/Hooks.php#L50
https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/includes/Skins/SkinMinerva.php#L138
which looks a little like this:
$out->addMeta( 'viewport', 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' . 'maximum-scale=5.0, width=device-width' );
Unfortunately the value of viewport is never consistent and it creates challenges for template editors trying to target styles specifically to those that use it
Many template editors are adding rules to target responsive skins such as:
body.skin-timeless,
body.skin-minerva {
...
}proposal
- Skins will be able to pass an option responsive [1]. When set it will automatically add a viewport and will also add a class to the body 'skin--responsive'
- the option defaults to false
- Minerva updated to use it
- Timeless updated to use it
[1] https://github.com/wikimedia/mediawiki/blob/master/includes/skins/Skin.php#L152