2022-12-20 18:09:01 +00:00
|
|
|
@import '../../common/variables.less';
|
|
|
|
|
|
|
|
.mw-table-of-contents-container {
|
|
|
|
// Needed for Grid-based layout
|
|
|
|
align-self: start;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
#vector-toc-pinned-container {
|
|
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
|
|
.vector-toc-pinned & {
|
|
|
|
// Default spacing separating the sidebar TOC from the main menu or viewport.
|
|
|
|
// Need to use padding in order for the spacing to apply when sticky
|
|
|
|
padding-top: 1.5em;
|
|
|
|
}
|
|
|
|
|
2022-12-22 23:10:29 +00:00
|
|
|
.vector-feature-page-tools-disabled.vector-toc-pinned @{selector-main-menu-closed} ~ .mw-table-of-contents-container & {
|
2022-12-20 18:09:01 +00:00
|
|
|
// Needed to align TOC with bottom of title, 1.5em padding + 1.5em margin = 3em
|
|
|
|
margin-top: 1.5em;
|
|
|
|
}
|
|
|
|
|
2022-12-22 23:10:29 +00:00
|
|
|
.vector-feature-page-tools-enabled.vector-toc-pinned.vector-feature-main-menu-pinned-disabled & {
|
|
|
|
// Needed to align TOC with bottom of title, 1.5em (24px) padding + 22px margin = ~46px (height of page titlebar)
|
|
|
|
margin-top: 22px;
|
|
|
|
}
|
|
|
|
|
2022-12-20 22:58:44 +00:00
|
|
|
// FIXME: Remove all .sidebar-toc selectors after I5b9228380f5c4674ef424d33127a5cb4010822da is in prod for 5 days
|
2022-12-20 18:09:01 +00:00
|
|
|
.sidebar-toc,
|
2022-12-20 22:58:44 +00:00
|
|
|
.sidebar-toc:after,
|
|
|
|
.vector-toc,
|
|
|
|
.vector-toc:after {
|
2022-12-22 23:10:29 +00:00
|
|
|
.vector-feature-page-tools-disabled & {
|
|
|
|
// Align the left edge of the TOC text with the main menu button icon.
|
|
|
|
margin-left: -@padding-left-toc;
|
|
|
|
}
|
|
|
|
|
|
|
|
.vector-feature-page-tools-enabled & {
|
|
|
|
// Align the left edge of the TOC text with the main menu button icon.
|
|
|
|
margin-left: -@spacing-subsection-toggle;
|
|
|
|
padding-left: @spacing-subsection-toggle;
|
|
|
|
}
|
2022-12-20 18:09:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// T302076: Add fade scrollable indicator when TOC is in sidebar
|
|
|
|
// Avoid showing indicator when the TOC is floating, or collapsed in the page title/sticky header
|
2022-12-20 22:58:44 +00:00
|
|
|
// FIXME: Remove all .sidebar-toc selectors after I5b9228380f5c4674ef424d33127a5cb4010822da is in prod for 5 days
|
|
|
|
.vector-toc-pinned & .vector-toc:after,
|
|
|
|
.vector-toc-pinned & .sidebar-toc:after {
|
2022-12-20 18:09:01 +00:00
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
2022-12-20 22:58:44 +00:00
|
|
|
height: @height-toc-scroll-indicator;
|
2022-12-20 18:09:01 +00:00
|
|
|
background: linear-gradient( rgba( 255, 255, 255, 0 ), @background-color-page-container );
|
|
|
|
background-repeat: no-repeat;
|
2022-12-20 22:58:44 +00:00
|
|
|
background-position: -@padding-right-toc; // T311436 Hacky way to prevent the fade from covering the scrollbar
|
2022-12-20 18:09:01 +00:00
|
|
|
pointer-events: none; // Make the link below the fade clickable
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|