mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Merge "Update #siteSub, #contentSub and #contentSub2 to fix spacing, conditionally render #contentSub and #contentSub2"
This commit is contained in:
commit
a4949503f6
|
@ -460,11 +460,8 @@ abstract class SkinVector extends SkinMustache {
|
||||||
// Conditionally used values must use null to indicate absence (not false or '').
|
// Conditionally used values must use null to indicate absence (not false or '').
|
||||||
$commonSkinData = array_merge( $parentData, [
|
$commonSkinData = array_merge( $parentData, [
|
||||||
'is-legacy' => $this->isLegacy(),
|
'is-legacy' => $this->isLegacy(),
|
||||||
|
|
||||||
'input-location' => $this->getSearchBoxInputLocation(),
|
'input-location' => $this->getSearchBoxInputLocation(),
|
||||||
|
|
||||||
'sidebar-visible' => $this->isSidebarVisible(),
|
'sidebar-visible' => $this->isSidebarVisible(),
|
||||||
|
|
||||||
'is-language-in-content' => $this->isLanguagesInContent(),
|
'is-language-in-content' => $this->isLanguagesInContent(),
|
||||||
'is-language-in-content-top' => $this->isLanguagesInContentAt( 'top' ),
|
'is-language-in-content-top' => $this->isLanguagesInContentAt( 'top' ),
|
||||||
'is-language-in-content-bottom' => $this->isLanguagesInContentAt( 'bottom' ),
|
'is-language-in-content-bottom' => $this->isLanguagesInContentAt( 'bottom' ),
|
||||||
|
|
|
@ -167,7 +167,9 @@ class SkinVector22 extends SkinVector {
|
||||||
$isGrid = $featureManager->isFeatureEnabled(
|
$isGrid = $featureManager->isFeatureEnabled(
|
||||||
Constants::FEATURE_GRID
|
Constants::FEATURE_GRID
|
||||||
);
|
);
|
||||||
return $parentData + [
|
return array_merge( $parentData, [
|
||||||
|
// Cast empty string to null
|
||||||
|
'html-subtitle' => $parentData['html-subtitle'] === '' ? null : $parentData['html-subtitle'],
|
||||||
'is-vector-grid' => $isGrid,
|
'is-vector-grid' => $isGrid,
|
||||||
'vector-layout-class' => $isGrid ? 'vector-layout-grid vector-toc-visible' : 'vector-layout-legacy',
|
'vector-layout-class' => $isGrid ? 'vector-layout-grid vector-toc-visible' : 'vector-layout-legacy',
|
||||||
'data-vector-sticky-header' => $featureManager->isFeatureEnabled(
|
'data-vector-sticky-header' => $featureManager->isFeatureEnabled(
|
||||||
|
@ -185,6 +187,6 @@ class SkinVector22 extends SkinVector {
|
||||||
Constants::FEATURE_STICKY_HEADER_EDIT
|
Constants::FEATURE_STICKY_HEADER_EDIT
|
||||||
)
|
)
|
||||||
) : false,
|
) : false,
|
||||||
];
|
] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,8 @@
|
||||||
|
|
||||||
<div id="bodyContent" class="vector-body" data-mw-ve-target-container>
|
<div id="bodyContent" class="vector-body" data-mw-ve-target-container>
|
||||||
{{>ContentSubheader}}
|
{{>ContentSubheader}}
|
||||||
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
|
{{#html-subtitle}}<div id="contentSub"{{{html-user-language-attributes}}}>{{{.}}}</div>{{/html-subtitle}}
|
||||||
<div id="contentSub2">{{{html-undelete-link}}}</div>
|
{{#html-undelete-link}}<div id="contentSub2">{{{.}}}</div>{{/html-undelete-link}}
|
||||||
{{{html-user-message}}}
|
{{{html-user-message}}}
|
||||||
{{{html-body-content}}}
|
{{{html-body-content}}}
|
||||||
{{{html-categories}}}
|
{{{html-categories}}}
|
||||||
|
|
|
@ -96,13 +96,14 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mw-body-subheader {
|
#siteSub {
|
||||||
// avoid margin collapsing by setting a border-bottom and margin-top as this will sometimes
|
margin-top: 8px; // T311564
|
||||||
// be empty if no indicators.
|
}
|
||||||
// The total of margin-top and height should be 16px. Since we're using relative units 1em=14px
|
|
||||||
// We need to set both height and margin so that the margin is not ignored.
|
#contentSub,
|
||||||
margin-top: 1em;
|
#contentSub2 {
|
||||||
border-bottom: 2px @border-style-base transparent;
|
// T311564: Override core styles to apply margin-top rather than margin-bottom
|
||||||
|
margin: 8px 0 0 1em !important; // stylelint-disable-line declaration-no-important
|
||||||
}
|
}
|
||||||
|
|
||||||
.mw-header {
|
.mw-header {
|
||||||
|
@ -111,6 +112,10 @@ body {
|
||||||
z-index: @z-index-header;
|
z-index: @z-index-header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mw-body-content {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Main column */
|
/* Main column */
|
||||||
.mw-body,
|
.mw-body,
|
||||||
#mw-data-after-content,
|
#mw-data-after-content,
|
||||||
|
|
Loading…
Reference in a new issue