mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-29 09:55:42 +00:00
4efafaf374
Causes 4 minor visual regressions where the collapsed toc width is slightly smaller will be fixed when page tools is deployed. https://jmp.sh/o3vlGVlb - Remove @padding-vertical-toc, @padding-right-toc and @padding-left-toc variables, which would need to be removed after page tools is enabled anyway - Remove @height-collapsed-toc-button, @padding-top-content-px and @max-width-collapsed-toc variables which weren't needed - Greatly simplify CSS for collapsed TOC width Bug: T324877 Change-Id: I6d44d4b49fb5dccd776dfe0e96740fdb9bff4c5d
73 lines
2.5 KiB
Plaintext
73 lines
2.5 KiB
Plaintext
@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;
|
|
}
|
|
|
|
.vector-feature-page-tools-disabled.vector-toc-pinned @{selector-main-menu-closed} ~ .mw-table-of-contents-container & {
|
|
// Needed to align TOC with bottom of title, 1.5em padding + 1.5em margin = 3em
|
|
margin-top: 1.5em;
|
|
}
|
|
|
|
.vector-feature-page-tools-enabled.vector-toc-pinned.vector-feature-main-menu-pinned-disabled & {
|
|
// Align TOC with bottom of title when main menu is not pinned but the TOC is
|
|
margin-top: @margin-top-pinned-toc;
|
|
}
|
|
|
|
.vector-feature-page-tools-enabled & .vector-toc {
|
|
padding-right: @padding-horizontal-dropdown-menu-item;
|
|
// Add extra padding for the fade scrollable indicator, which is 30px tall
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
// FIXME: Remove all .sidebar-toc selectors after I5b9228380f5c4674ef424d33127a5cb4010822da is in prod for 5 days
|
|
.sidebar-toc,
|
|
.sidebar-toc:after,
|
|
.vector-toc,
|
|
.vector-toc:after {
|
|
.vector-feature-page-tools-disabled & {
|
|
// Align the left edge of the TOC text with the main menu button icon.
|
|
margin-left: -27px;
|
|
}
|
|
|
|
.vector-feature-page-tools-enabled & {
|
|
// Align the left edge of the TOC text with the page container
|
|
margin-left: -@spacing-subsection-toggle;
|
|
padding-left: @spacing-subsection-toggle;
|
|
}
|
|
}
|
|
|
|
// 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
|
|
// 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 {
|
|
content: '';
|
|
display: block;
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: @height-toc-scroll-indicator;
|
|
background: linear-gradient( rgba( 255, 255, 255, 0 ), @background-color-page-container );
|
|
background-repeat: no-repeat;
|
|
background-position: -@scrollbar-offset-toc-scroll-indicator; // T311436 Hacky way to prevent the fade from covering the scrollbar
|
|
pointer-events: none; // Make the link below the fade clickable
|
|
}
|
|
}
|
|
}
|