Revert "Layout: restore sticky toc behavior by adding additional TOC container"

This reverts commit 3a26cc220c.

Reason for revert: Pixel flagged a UI regression relating to this change https://phabricator.wikimedia.org/F35291665

Change-Id: Id0b3d13da7dfbd8a55605e9f1fae157fe45abd2f
This commit is contained in:
Jdlrobson 2022-06-30 22:53:19 +00:00
parent 3a26cc220c
commit e16a8e4775
2 changed files with 6 additions and 16 deletions

View File

@ -1,8 +1,3 @@
{{! Grid element, spans full height }}
<div class="mw-table-of-contents-container">
{{! Sticky element, aligned with top of viewport }}
<div class="sticky-toc-container mw-sticky-header-element">
{{! TOC element, applies additional margins for spacing }}
{{#data-toc}}{{>TableOfContents}}{{/data-toc}}
</div>
<div class="mw-table-of-contents-container mw-sticky-header-element">
{{#data-toc}}{{>TableOfContents}}{{/data-toc}}
</div>

View File

@ -195,7 +195,7 @@ body {
}
}
.mixin-sticky-toc() {
.mw-table-of-contents-container {
// stylelint-disable-next-line plugin/no-unsupported-browser-features
position: sticky;
float: left;
@ -203,18 +203,13 @@ body {
// ensuring the TOC is 1.5em (24px) from the top of the viewport
// unless .mw-sticky-header-element overrides it.
top: ~'calc( 1.5em - @{top-margin-sidebar-toc_title_inline} )';
}
.vector-layout-legacy .mw-table-of-contents-container {
.mixin-sticky-toc();
clear: both;
@{selector-workspace-container-sidebar-open} & {
top: 0;
}
}
.sticky-toc-container {
.mixin-sticky-toc();
.vector-layout-legacy & {
clear: both;
}
}
.parsoid-body {