Move VectorBeta modules to VectorBeta extension
authorjrobson <jrobson@wikimedia.org>
Thu, 5 Dec 2013 01:53:18 +0000 (17:53 -0800)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 19 Dec 2013 23:07:25 +0000 (23:07 +0000)
* Remove duplication of styles in skins.monobook and skins.vector by
  creating skins.common.
* At same time allow VectorBeta to replace Vector-specific skin styles
  without having to worry about common styles.

Dependency: Ie32a28f8f8c5fc8e4d0890a3d7d96bc82b39c481
Change-Id: Ia193571afffff36ecb1f14ee9036fb9bb98347e7

includes/DefaultSettings.php
includes/installer/WebInstallerOutput.php
resources/Resources.php
skins/MonoBook.php
skins/Vector.php
skins/vector/beta/screen.less [deleted file]
skins/vector/beta/variables.less [deleted file]
skins/vector/styles-beta.less [deleted file]

index b1265c1..6d6e528 100644 (file)
@@ -3344,6 +3344,7 @@ $wgResourceLoaderLESSFunctions = array(
  */
 $wgResourceLoaderLESSImportPaths = array(
        "$IP/resources/mediawiki.less/",
+       "$IP/skins/vector/",
 );
 
 /**
index 00a4ff8..2a3a584 100644 (file)
@@ -117,7 +117,8 @@ class WebInstallerOutput {
                // and loaded as one file.
                $moduleNames = array(
                        'mediawiki.legacy.shared',
-                       'skins.vector',
+                       'skins.common',
+                       'skins.vector.styles',
                        'mediawiki.legacy.config',
                );
 
index d2a06b7..c8f58e3 100644 (file)
@@ -76,6 +76,17 @@ return array(
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
        ),
+       'skins.common' => array(
+               // Used in the web installer. Test it after modifying this definition!
+               'styles' => array(
+                       'common/commonElements.css' => array( 'media' => 'screen' ),
+                       'common/commonContent.css' => array( 'media' => 'screen' ),
+                       'common/commonInterface.css' => array( 'media' => 'screen' ),
+               ),
+               'remoteBasePath' => $GLOBALS['wgStylePath'],
+               'localBasePath' => $GLOBALS['wgStyleDirectory'],
+       ),
+       // FIXME: Remove in favour of skins.monobook.styles when cache expires
        'skins.monobook' => array(
                'styles' => array(
                        'common/commonElements.css' => array( 'media' => 'screen' ),
@@ -86,8 +97,8 @@ return array(
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
        ),
+       // FIXME: Remove in favour of skins.vector.styles when cache expires
        'skins.vector' => array(
-               // Used in the web installer. Test it after modifying this definition!
                'styles' => array(
                        'common/commonElements.css' => array( 'media' => 'screen' ),
                        'common/commonContent.css' => array( 'media' => 'screen' ),
@@ -97,13 +108,17 @@ return array(
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
        ),
-       'skins.vector.beta' => array(
-               // Keep in sync with skins.vector
+       'skins.vector.styles' => array(
+               // Used in the web installer. Test it after modifying this definition!
                'styles' => array(
-                       'common/commonElements.css' => array( 'media' => 'screen' ),
-                       'common/commonContent.css' => array( 'media' => 'screen' ),
-                       'common/commonInterface.css' => array( 'media' => 'screen' ),
-                       'vector/styles-beta.less',
+                       'vector/styles.less',
+               ),
+               'remoteBasePath' => $GLOBALS['wgStylePath'],
+               'localBasePath' => $GLOBALS['wgStyleDirectory'],
+       ),
+       'skins.monobook.styles' => array(
+               'styles' => array(
+                       'monobook/main.css' => array( 'media' => 'screen' ),
                ),
                'remoteBasePath' => $GLOBALS['wgStylePath'],
                'localBasePath' => $GLOBALS['wgStyleDirectory'],
index f7fb0d8..fdcb0c1 100644 (file)
@@ -45,7 +45,7 @@ class SkinMonoBook extends SkinTemplate {
        function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
 
-               $out->addModuleStyles( 'skins.monobook' );
+               $out->addModuleStyles( array( 'skins.common', 'skins.monobook.styles' ) );
 
                // TODO: Migrate all of these
                $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );
index 288b5fd..a9ab8fb 100644 (file)
@@ -67,7 +67,7 @@ class SkinVector extends SkinTemplate {
        function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
 
-               $styles = array( 'skins.vector' );
+               $styles = array( 'skins.common', 'skins.vector.styles' );
                wfRunHooks( 'SkinVectorStyleModules', array( &$this, &$styles ) );
                $out->addModuleStyles( $styles );
        }
diff --git a/skins/vector/beta/screen.less b/skins/vector/beta/screen.less
deleted file mode 100644 (file)
index 6d56cd5..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Content */
-#content {
-       line-height: 1.5em;
-       .mw-editsection {
-               font-family: @content-font-family;
-       }
-
-       h1,
-       #firstHeading {
-               font-family: @content-heading-font-family;
-               font-size: 1.833em;
-               line-height: 22pt;
-               padding: 0;
-               margin-bottom: 4pt;
-       }
-
-       h2 {
-               font-size: 1.5em;
-               line-height: 22pt;
-       }
-
-       h2,
-       h3,
-       h4,
-       h5,
-       h6 {
-               font-family: @content-heading-font-family;
-               padding: 0;
-               margin-bottom: 4pt;
-               margin-top: 14pt;
-       }
-
-       h3 {
-               font-size: 1.17em;
-               line-height: 22pt;
-       }
-
-       h3,
-       h4 {
-               font-weight: bold;
-       }
-
-       h4,
-       h5,
-       h6 {
-               font-size: 100%; /* (reset) */
-       }
-
-       h6 {
-               font-style: italic;
-       }
-
-       p {
-               margin-bottom: 8pt;
-       }
-
-       // FIXME: this is hacky
-       #toc h2 {
-               font-size: 100%;
-       }
-}
-
-/* Personal menu */
-#p-personal a {
-       color: #555;
-}
-
-/* Main menu */
-div#mw-panel div.portal {
-       margin-left: 1.25em;
-       h3 {
-               margin: 0;
-               line-height: 1;
-       }
-}
diff --git a/skins/vector/beta/variables.less b/skins/vector/beta/variables.less
deleted file mode 100644 (file)
index 08e662d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-@html-font-size: 90%;
-
-@body-font-size: inherit;
-
-// Page content
-@content-font-family: "Helvetica Neue", "Helvetica", "Nimbus Sans L", "Arial", "Liberation Sans", sans-serif;
-@content-font-color: #252525;
-@content-font-size: 0.9em;
-@content-line-height: inherit;
-@content-padding: 1em;
-@content-heading-font-size: 1.6em;
-@content-heading-font-family: Georgia, "DejaVu Serif", serif;
-
-// Common menu
-@menu-link-color: #555;
-
-// Main menu
-@menu-main-font-size: 0.82em;
-@menu-main-heading-font-size: 100%;
-@menu-main-heading-padding: 5px 0;
-
-@menu-main-body-font-size: inherit;
-@menu-main-body-link-color: inherit;
-@menu-main-body-link-visited-color: inherit;
-@menu-main-body-margin: 0;
-@menu-main-body-padding: 0 0 10px;
-@menu-main-logo-left: 1.6em;
-
-// Personal menu
-@menu-personal-font-size: 0.75em;
-
-// Collapsible nav
-@collapsible-nav-heading-color: #555;
-@collapsible-nav-heading-collapsed-color: inherit;
-
-@collapsible-nav-heading-padding: 4px 0 3px 1.5em;
-@collapsible-nav-body-margin: 0 0 0 1.25em;
diff --git a/skins/vector/styles-beta.less b/skins/vector/styles-beta.less
deleted file mode 100644 (file)
index a76b639..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-@import "variables.less";
-@import "beta/variables.less";
-
-@media screen {
-       @import "screen.less";
-       @import "beta/screen.less";
-       @import "externalLinks.less";
-       @import "collapsibleNav.less";
-}
-
-@media screen and (min-width: 982px) {
-       @import "screen-hd.less";
-}