diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 140d4c964..b264e6545 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -21,6 +21,7 @@ * @file * @ingroup Skins */ +use Vector\Constants; /** * Skin subclass for Vector @@ -64,7 +65,9 @@ class SkinVector extends SkinTemplate { public function getDefaultModules() { $modules = parent::getDefaultModules(); // add vector skin styles and vector module - $modules['styles']['skin'][] = 'skins.vector.styles'; + $module = $this->getUser()->getOption( Constants::PREF_KEY_SKIN_VERSION ) + === Constants::SKIN_VERSION_LEGACY ? 'skins.vector.styles.legacy' : 'skins.vector.styles'; + $modules['styles']['skin'][] = $module; $modules['core'][] = 'skins.vector.js'; return $modules; diff --git a/resources/skins.vector.styles/legacy.less b/resources/skins.vector.styles/legacy.less new file mode 100644 index 000000000..45c017e15 --- /dev/null +++ b/resources/skins.vector.styles/legacy.less @@ -0,0 +1,19 @@ +@import '../../variables.less'; + +/* Vector screen styles */ +@media screen { + @import 'common.less'; + @import 'PersonalMenu.less'; + @import 'SearchBox.less'; + @import 'VectorTabs.less'; + @import 'watchstar.less'; + @import 'VectorMenu.less'; + @import 'Navigation.less'; + @import 'Portal.less'; + @import 'Sidebar.less'; + @import 'Footer.less'; + @import 'externalLinks.less'; +} + +@import 'hd.less'; +@import 'print.less'; diff --git a/skin.json b/skin.json index 4b1f626d7..75289fbe7 100644 --- a/skin.json +++ b/skin.json @@ -42,6 +42,15 @@ }, "@note": "When modifying skins.vector.styles definition, make sure the installer still works", "ResourceModules": { + "skins.vector.styles.legacy": { + "class": "ResourceLoaderSkinModule", + "features": [ "elements", "content", "interface", "logo" ], + "targets": [ + "desktop", + "mobile" + ], + "styles": [ "resources/skins.vector.styles/legacy.less" ] + }, "skins.vector.styles": { "class": "ResourceLoaderSkinModule", "features": [ "elements", "content", "interface", "logo" ],