diff --git a/includes/ResourceLoaderLessModule.php b/includes/ResourceLoaderLessModule.php deleted file mode 100644 index 4386726c..00000000 --- a/includes/ResourceLoaderLessModule.php +++ /dev/null @@ -1,64 +0,0 @@ -getConfigFactory()->makeConfig( 'vector' ); - $printLogo = $config->get( 'VectorPrintLogo' ); - } catch ( ConfigException $e ) { - // Config is not available when running in the context of the MediaWiki installer. (T183640) - $printLogo = false; - } - if ( $printLogo ) { - $lessVars[ 'printLogo' ] = true; - $lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue( $printLogo['url'] ); - $lessVars[ 'printLogoWidth' ] = intval( $printLogo['width'] ); - $lessVars[ 'printLogoHeight' ] = intval( $printLogo['height'] ); - } else { - $lessVars[ 'printLogo' ] = false; - } - return $lessVars; - } -} diff --git a/includes/SkinVector.php b/includes/SkinVector.php index d3ee83a1..140d4c96 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -64,7 +64,6 @@ class SkinVector extends SkinTemplate { public function getDefaultModules() { $modules = parent::getDefaultModules(); // add vector skin styles and vector module - $modules['styles']['skin'][] = 'mediawiki.skinning.interface'; $modules['styles']['skin'][] = 'skins.vector.styles'; $modules['core'][] = 'skins.vector.js'; diff --git a/resources/skins.vector.styles/print.less b/resources/skins.vector.styles/print.less index 638e9153..d0825cb9 100644 --- a/resources/skins.vector.styles/print.less +++ b/resources/skins.vector.styles/print.less @@ -6,29 +6,6 @@ @border-color-base: @wmui-color-base0; @border-color-footer: #eee; -// We have to render the wordmark image before the print dialog is invoked, otherwise the image -// won't render in the printed file. Use a little hack to render the image outside the viewport -// and bring it in the viewport in print view. -.firstHeading { - // We could also use a CSS background to display the logo. - // The problem is that the logo won't be printed unless the user prints the background too. - // Note. This specification does not fully define the interaction of :before and :after with - // replaced elements (such as IMG in HTML). This will be defined in more detail in a future - // specification. See https://www.w3.org/TR/CSS2/generate.html#before-after-content - & when( @printLogo = 1 ) { - &:before { - content: @printLogoUrl; - display: block; - height: ~'@{printLogoHeight}px'; - left: -9999px; - line-height: 0; // line-height is needed for correctly displaying the size of the content box. - margin-bottom: 20px; - position: absolute; - width: ~'@{printLogoWidth}px'; - } - } -} - @media print { /* These styles retain the existing typography in screen.less @@ -79,14 +56,6 @@ line-height: 28pt; margin-bottom: 20px; padding-bottom: 5px; - - // Bring back the wordmark to the viewport (see above how it's rendered outside the viewport). - & when( @printLogo = 1 ) { - &:before { - left: auto; - position: relative; - } - } } // Headings diff --git a/skin.json b/skin.json index 0c2e8363..b38b2518 100644 --- a/skin.json +++ b/skin.json @@ -24,8 +24,7 @@ "AutoloadClasses": { "Vector\\Hooks": "includes/Hooks.php", "SkinVector": "includes/SkinVector.php", - "VectorTemplate": "includes/VectorTemplate.php", - "Vector\\ResourceLoaderLessModule": "includes/ResourceLoaderLessModule.php" + "VectorTemplate": "includes/VectorTemplate.php" }, "Hooks": { "BeforePageDisplayMobile": "Vector\\Hooks::onBeforePageDisplayMobile" @@ -33,7 +32,8 @@ "@note": "When modifying skins.vector.styles definition, make sure the installer still works", "ResourceModules": { "skins.vector.styles": { - "class": "Vector\\ResourceLoaderLessModule", + "class": "ResourceLoaderSkinModule", + "features": [ "elements", "content", "interface", "logo" ], "targets": [ "desktop", "mobile"