2022-06-08 15:03:38 +00:00
|
|
|
@import '../../common/variables.less';
|
|
|
|
|
|
|
|
#vector-toc-collapsed-button {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( max-width: @width-breakpoint-desktop ) {
|
|
|
|
#vector-toc-collapsed-button,
|
|
|
|
.sidebar-toc {
|
|
|
|
z-index: @z-index-menu;
|
|
|
|
}
|
|
|
|
|
|
|
|
#vector-toc-collapsed-button {
|
|
|
|
// Temporary !important needed while style attribute is present in HTML.
|
|
|
|
// This is because new HTML can be loaded with old CSS.
|
|
|
|
/* stylelint-disable-next-line declaration-no-important */
|
|
|
|
display: block !important;
|
|
|
|
float: left;
|
2022-06-14 15:41:51 +00:00
|
|
|
margin-right: 4px;
|
|
|
|
margin-left: -10px;
|
2022-06-08 15:03:38 +00:00
|
|
|
// Reduce padding to fit with page title
|
|
|
|
padding: 7px 10px 7px 10px;
|
|
|
|
|
|
|
|
// Override background color for when the TOC is overlaps content
|
|
|
|
// as a sticky element when the page is scrolled down.
|
|
|
|
background-color: @background-color-base;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:active {
|
|
|
|
background-color: @colorGray15;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-table-of-contents-container {
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-toc {
|
|
|
|
position: absolute;
|
|
|
|
top: 44px;
|
2022-06-14 15:41:51 +00:00
|
|
|
left: -2px;
|
2022-06-08 15:03:38 +00:00
|
|
|
// !important needed to override rules in Sidebar.less
|
|
|
|
/* stylelint-disable-next-line declaration-no-important */
|
|
|
|
margin-top: 0 !important;
|
|
|
|
|
|
|
|
// Dropdown styles
|
|
|
|
background-color: @color-base--inverted;
|
|
|
|
border: @border-width-base @border-style-base @border-color-base;
|
|
|
|
|
|
|
|
// Remove TOC fade
|
|
|
|
&:after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#vector-toc-collapsed-checkbox:checked ~ .mw-table-of-contents-container {
|
|
|
|
position: relative;
|
|
|
|
clear: none;
|
|
|
|
|
|
|
|
.sidebar-toc {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-14 15:41:51 +00:00
|
|
|
@media ( min-width: @width-breakpoint-tablet ) and ( max-width: @width-breakpoint-desktop ) {
|
|
|
|
body:not( .vector-below-page-title ) @{selector-checkbox-hack} .sidebar-toc {
|
|
|
|
// Adjust TOC for when the page title is farther right on the screen
|
|
|
|
// i.e. when the main menu is open and the viewport is between tablet and desktop
|
|
|
|
left: 22px;
|
2022-06-08 15:03:38 +00:00
|
|
|
}
|
|
|
|
}
|