Print styles in Vector are no longer feature flagged

Remove feature flagging of print styles

Changes:
* Merge experimental module into skins.vector.styles
* Update skins.vector.styles RL class to support LESS variable
* Remove feature flag class in HTML and LESS (update indents in
LESS file)

Bug: T178028
Change-Id: I8d5c59c5c9f415ffbd7fa41a512cbea87887e9e7
This commit is contained in:
jdlrobson 2017-11-02 11:04:58 -07:00
parent 1ed289f520
commit c863b94302
3 changed files with 156 additions and 179 deletions

View File

@ -44,9 +44,6 @@ 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;
}
@ -74,14 +71,6 @@ 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' );
}

View File

@ -4,8 +4,7 @@
// 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.
.vector-experimental-print-styles {
.firstHeading {
.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
@ -23,7 +22,6 @@
width: ~'@{printLogoWidth}px';
}
}
}
}
@media print {
@ -32,7 +30,7 @@
In future (when deploying these styles) we may want to refactor skins.vector.styles
to apply certain styles in print as well as screen mode. */
#toc,
body.vector-experimental-print-styles {
body {
padding: 10px;
font-family: @font-family-serif;
}
@ -53,8 +51,6 @@
font-family: @font-family-sans-serif;
}
.vector-experimental-print-styles {
// Normalize Blue links in the article
a {
border-bottom: 1px solid #aaa;
@ -210,7 +206,6 @@
display: inline-block;
}
}
}
.printfooter {
margin-top: 10px;

View File

@ -38,6 +38,7 @@
"@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": {
@ -46,17 +47,11 @@
},
"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",
@ -110,8 +105,6 @@
"config": {
"VectorUseSimpleSearch": true,
"VectorUseIconWatch": true,
"@VectorExperimentalPrintStyles": "Temporary config variable to feature flag new print styles (T154965)",
"VectorExperimentalPrintStyles": false,
"VectorResponsive": false,
"VectorPrintLogo": false
},