mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 09:30:17 +00:00
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:
parent
36f68d37d3
commit
b0281fa450
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue