Add CSS class on body to mark the skin version

Adds class 'skin-vector-legacy' for legacy layout.

Bug: T251648
Change-Id: I52938689fc7d99a710510349aaa573a87864a367
This commit is contained in:
AronDemian 2020-05-08 16:30:26 +02:00
parent 36f68d37d3
commit b0281fa450

View file

@ -62,6 +62,18 @@ class SkinVector extends SkinTemplate {
}
}
/**
* Called by OutputPage::headElement when it is creating the
* `<body>` tag. Overrides method in Skin class.
* @param OutputPage $out
* @param array &$bodyAttrs
*/
public function addToBodyAttributes( $out, &$bodyAttrs ) {
if ( $this->isLegacy() ) {
$bodyAttrs['class'] .= ' skin-vector-legacy';
}
}
/**
* @inheritDoc
* @return array