diff --git a/includes/templates/TableOfContentsContainer.mustache b/includes/templates/TableOfContentsContainer.mustache index 91d5004f..e3e172f2 100644 --- a/includes/templates/TableOfContentsContainer.mustache +++ b/includes/templates/TableOfContentsContainer.mustache @@ -1,7 +1,7 @@
{{! T313060 Additional container div needed to prevent the sticky element from being siblings with the footer }} {{#data-toc}} -
+
{{>TableOfContents}}
{{/data-toc}} diff --git a/resources/skins.vector.styles/components/StickyHeader.less b/resources/skins.vector.styles/components/StickyHeader.less index d759aff0..63b5fae4 100644 --- a/resources/skins.vector.styles/components/StickyHeader.less +++ b/resources/skins.vector.styles/components/StickyHeader.less @@ -157,17 +157,20 @@ opacity: 1; transform: translateY( 0 ); } + } - // 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; - } + // - T314330 `.vector-toc-not-collapsed .vector-sticky-toc-container` + // Prevent ToC from jumping when sticky header is enabled. + // - T289817 `.mw-sticky-header-element` provides an API for template developers + // to make their templates compatible with the Vector 2022 sticky header. + // @stable See the Integration notes for developers section at + // https://www.mediawiki.org/wiki/Reading/Web/Desktop_Improvements/Features/Sticky_Header + // - `.charts-stickyhead th` makes chart and table headers appear below the sticky header. + .vector-toc-not-collapsed .vector-sticky-toc-container, + .mw-sticky-header-element, + .charts-stickyhead th { + /* stylelint-disable-next-line declaration-no-important */ + top: @height-sticky-header !important; } } }