2022-06-08 15:03:38 +00:00
|
|
|
@import '../../common/variables.less';
|
|
|
|
|
2022-07-08 17:51:28 +00:00
|
|
|
@selector-collapsed-toc-closed: ~'#vector-toc-collapsed-checkbox:not( :checked )';
|
2022-06-10 17:58:21 +00:00
|
|
|
|
2022-06-08 15:03:38 +00:00
|
|
|
#vector-toc-collapsed-button {
|
|
|
|
display: none;
|
2022-07-08 16:13:32 +00:00
|
|
|
float: left;
|
|
|
|
margin-right: 4px;
|
|
|
|
margin-left: -@icon-padding-md;
|
|
|
|
// 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;
|
2022-06-08 15:03:38 +00:00
|
|
|
|
2022-07-08 16:13:32 +00:00
|
|
|
&:hover,
|
|
|
|
&:active {
|
|
|
|
background-color: @colorGray15;
|
2022-06-08 15:03:38 +00:00
|
|
|
}
|
2022-07-08 16:13:32 +00:00
|
|
|
}
|
2022-06-08 15:03:38 +00:00
|
|
|
|
2022-07-08 16:13:32 +00:00
|
|
|
#vector-toc-collapsed-button,
|
|
|
|
.sidebar-toc {
|
|
|
|
z-index: @z-index-menu;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mixin-collapse-toc-page-title {
|
2022-06-08 15:03:38 +00:00
|
|
|
#vector-toc-collapsed-button {
|
2022-06-10 21:14:39 +00:00
|
|
|
display: block;
|
2022-06-08 15:03:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-table-of-contents-container {
|
2022-06-10 17:58:21 +00:00
|
|
|
position: relative;
|
2022-06-30 22:37:08 +00:00
|
|
|
|
|
|
|
.vector-layout-legacy & {
|
|
|
|
// !important needed to override rules in screen.less
|
|
|
|
top: 0 !important; /* stylelint-disable-line declaration-no-important */
|
|
|
|
}
|
2022-06-08 15:03:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.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
|
2022-07-20 01:18:07 +00:00
|
|
|
margin: 0 !important; /* stylelint-disable-line declaration-no-important */
|
2022-06-08 15:03:38 +00:00
|
|
|
|
|
|
|
// Dropdown styles
|
|
|
|
border: @border-width-base @border-style-base @border-color-base;
|
|
|
|
|
|
|
|
// Remove TOC fade
|
|
|
|
&:after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-08 17:51:28 +00:00
|
|
|
@{selector-collapsed-toc-closed} ~ .mw-table-of-contents-container .sidebar-toc {
|
|
|
|
// Hide the TOC when the button is not checked
|
|
|
|
display: none;
|
2022-06-10 17:58:21 +00:00
|
|
|
}
|
2022-07-08 16:13:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@media ( max-width: @max-width-tablet ) {
|
|
|
|
.mixin-collapse-toc-page-title();
|
2022-06-08 15:03:38 +00:00
|
|
|
|
2022-06-10 17:58:21 +00:00
|
|
|
.vector-below-page-title {
|
|
|
|
#vector-toc-collapsed-button,
|
2022-06-08 15:03:38 +00:00
|
|
|
.sidebar-toc {
|
2022-06-10 17:58:21 +00:00
|
|
|
position: fixed;
|
|
|
|
}
|
|
|
|
|
|
|
|
#vector-toc-collapsed-button {
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-toc {
|
|
|
|
// TOC button height
|
|
|
|
top: 36px;
|
|
|
|
left: 6px;
|
2022-06-08 15:03:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-08 16:13:32 +00:00
|
|
|
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
@supports ( display: grid ) {
|
|
|
|
.vector-toc-collapsed .vector-layout-grid {
|
|
|
|
.mixin-collapse-toc-page-title();
|
|
|
|
|
|
|
|
.mw-table-of-contents-container {
|
|
|
|
grid-area: content;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-toc {
|
|
|
|
left: -@icon-padding-md;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|