diff --git a/SkinVector.php b/SkinVector.php index 5dd6ef2..23dd944 100644 --- a/SkinVector.php +++ b/SkinVector.php @@ -44,6 +44,10 @@ class SkinVector extends SkinTemplate { /** @inheritDoc */ public function getPageClasses( $title ) { $className = parent::getPageClasses( $title ); + if ( $this->vectorConfig->get( 'VectorExperimentalPrintStyles' ) ) { + $className .= ' vector-experimental-print-styles'; + } + $className .= ' vector-nav-directionality'; return $className; } @@ -70,6 +74,14 @@ class SkinVector extends SkinTemplate { $this->enableResponsiveMode(); } + // Print styles are feature flagged. + // This flag can be removed when T169732 is resolved. + if ( $this->vectorConfig->get( 'VectorExperimentalPrintStyles' ) ) { + // Note, when deploying (T169732) we'll want to fold the stylesheet into + // skins.vector.styles and remove this module altogether. + $out->addModuleStyles( 'skins.vector.styles.experimental.print' ); + } + $out->addModules( 'skins.vector.js' ); } diff --git a/skin.json b/skin.json index b2b079f..47bdb50 100644 --- a/skin.json +++ b/skin.json @@ -38,7 +38,6 @@ "@note": "When modifying skins.vector.styles definition, make sure the installer still works", "ResourceModules": { "skins.vector.styles": { - "class": "Vector\\ResourceLoaderLessModule", "targets": [ "desktop", "mobile" ], "position": "top", "styles": { @@ -47,11 +46,17 @@ }, "screen-hd.less": { "media": "screen and (min-width: 982px)" - }, - "print.less": {} + } } }, - + "skins.vector.styles.experimental.print": { + "class": "Vector\\ResourceLoaderLessModule", + "targets": [ "desktop", "mobile" ], + "position": "top", + "styles": [ + "print.less" + ] + }, "skins.vector.styles.responsive": { "targets": [ "desktop", "mobile" ], "position": "top", @@ -105,6 +110,8 @@ "config": { "VectorUseSimpleSearch": true, "VectorUseIconWatch": true, + "@VectorExperimentalPrintStyles": "Temporary config variable to feature flag new print styles (T154965)", + "VectorExperimentalPrintStyles": false, "VectorResponsive": false, "VectorPrintLogo": false },