Followup: Removed code for cached HTML from T313060
Bug: T313060 Depends-on: Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c Change-Id: I0626f5c8d92836ecac961bbe213ffd8b0f0e2df5
This commit is contained in:
parent
5e02d2b7ea
commit
6b7197cf95
|
@ -60,11 +60,8 @@ function moveToc( position ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Remove after Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c has been in prod for 5 days
|
|
||||||
const isCachedHtml = document.querySelector( '.mw-table-of-contents-container.mw-sticky-header-element' );
|
|
||||||
|
|
||||||
let newTocContainer;
|
let newTocContainer;
|
||||||
const sidebarTocContainerClass = isCachedHtml ? 'mw-table-of-contents-container' : 'vector-sticky-toc-container';
|
const sidebarTocContainerClass = 'vector-sticky-toc-container';
|
||||||
const stickyHeaderTocContainerClass = 'vector-menu-content';
|
const stickyHeaderTocContainerClass = 'vector-menu-content';
|
||||||
// Avoid moving TOC if unnecessary
|
// Avoid moving TOC if unnecessary
|
||||||
if ( !currTocContainer.classList.contains( sidebarTocContainerClass ) && position === 'sidebar' ) {
|
if ( !currTocContainer.classList.contains( sidebarTocContainerClass ) && position === 'sidebar' ) {
|
||||||
|
|
|
@ -15,24 +15,6 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Remove selector after Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c has been in prod for 5 days
|
|
||||||
.mw-table-of-contents-container.mw-sticky-header-element {
|
|
||||||
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
// Needed for Grid-based layout
|
|
||||||
align-self: start;
|
|
||||||
height: unset;
|
|
||||||
|
|
||||||
// Needed to align TOC with bottom of title
|
|
||||||
// 1.5em from .mw-table-of-contents-container + 1.5em from .sidebar-toc = 3em
|
|
||||||
@media ( min-width: @min-width-desktop ) {
|
|
||||||
.vector-toc-not-collapsed @{selector-main-menu-closed} ~ & {
|
|
||||||
margin-top: 1.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.vector-sticky-toc-container {
|
.vector-sticky-toc-container {
|
||||||
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
@ -52,11 +34,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Remove selector after Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c has been in prod for 5 days
|
|
||||||
.mw-table-of-contents-container > .sidebar-toc {
|
|
||||||
margin-top: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-toc {
|
.sidebar-toc {
|
||||||
max-height: 75vh;
|
max-height: 75vh;
|
||||||
padding: @sidebar-toc-vertical-padding @sidebar-toc-right-padding @sidebar-toc-vertical-padding @sidebar-toc-left-padding;
|
padding: @sidebar-toc-vertical-padding @sidebar-toc-right-padding @sidebar-toc-vertical-padding @sidebar-toc-left-padding;
|
||||||
|
|
|
@ -64,8 +64,6 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Remove this selector after Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c has been in prod for 5 days
|
|
||||||
.mw-table-of-contents-container.mw-sticky-header-element,
|
|
||||||
.vector-sticky-toc-container {
|
.vector-sticky-toc-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue