Only apply sticky header offset if it is showing sticky

Only apply sticky header offset to mw-sticky-header-element if the
header is actually sticky, currently at min-desktop-width of 1000px

Bug: T313187
Bug: T313619
Change-Id: I081c694b263a68498468b837cffa1cbea136d36f
This commit is contained in:
Derk-Jan Hartman 2022-07-23 14:06:09 +02:00 committed by Jdlrobson
parent 95ce5900bf
commit e7f0106917
1 changed files with 13 additions and 10 deletions

View File

@ -143,15 +143,18 @@
}
}
.client-js .vector-sticky-header-visible {
// T289817 Override other sticky element offsets to ensure that other
// sticky elements (i.e. table headers) appear below the sticky header.
//
// @stable See the Integration notes for developers section at
// https://www.mediawiki.org/wiki/Reading/Web/Desktop_Improvements/Features/Sticky_Header
.mw-sticky-header-element,
.charts-stickyhead th {
/* stylelint-disable-next-line declaration-no-important */
top: @height-sticky-header !important;
// T298836 Sticky header is only shown at higher resolutions
@media ( min-width: @min-width-desktop ) {
.client-js .vector-sticky-header-visible {
// T289817 Override other sticky element offsets to ensure that other
// sticky elements (i.e. table headers) appear below the sticky header.
//
// @stable See the Integration notes for developers section at
// https://www.mediawiki.org/wiki/Reading/Web/Desktop_Improvements/Features/Sticky_Header
.mw-sticky-header-element,
.charts-stickyhead th {
/* stylelint-disable-next-line declaration-no-important */
top: @height-sticky-header !important;
}
}
}