mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-25 08:05:51 +00:00
0440eeada4
Per T318169#8601576, the space between the top of the TOC and Page tools to the top of the viewport or bottom of the sticky header should be 30px. * Revises the page tools columnEnd grid to begin at the top of the titlebar to enable 30px of top padding on the page tools * Consolidates some styles in TableOfContentsPinned.less VISUAL CHANGE: table of contents moves down page. Bug: T318169 Bug: T319315 Change-Id: If8d8f87942d6265461b1a1a8ccf1c447d6e8b0d6
72 lines
2.4 KiB
Plaintext
72 lines
2.4 KiB
Plaintext
@import '../../common/variables.less';
|
|
@import '../../common/mixins.less';
|
|
|
|
.mw-table-of-contents-container {
|
|
// Needed for Grid-based layout
|
|
align-self: start;
|
|
height: 100%;
|
|
}
|
|
|
|
@media ( min-width: @min-width-desktop ) {
|
|
#mw-panel-toc {
|
|
.vector-toc-pinned & {
|
|
// Support: Chrome
|
|
// Work around sticky-positioned layers disabling subpixel text rendering (T327460).
|
|
// NOTE: This property has an effect similar to 'overflow: hidden', and will prevent elements
|
|
// inside of the panel from being rendered outside of its bounding box, even when they would
|
|
// be positioned there using absolute positioning, negative margin, transforms, etc.
|
|
// That's why the negative margins have to be applied here, instead of on #vector-toc.
|
|
contain: paint;
|
|
}
|
|
|
|
.vector-feature-page-tools-disabled .vector-toc-pinned & {
|
|
// Align the left edge of the TOC text with the main menu button icon.
|
|
margin-left: -27px;
|
|
}
|
|
|
|
.vector-feature-page-tools-enabled .vector-toc-pinned & {
|
|
// Align the left edge of the TOC text with the page container
|
|
margin-left: -@spacing-subsection-toggle;
|
|
}
|
|
}
|
|
|
|
#vector-toc-pinned-container {
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
|
position: sticky;
|
|
top: 0;
|
|
|
|
.vector-toc-pinned & {
|
|
// Default spacing separating the sidebar TOC from the main menu.
|
|
margin-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.
|
|
margin-top: @margin-top-pinned-toc;
|
|
}
|
|
|
|
.vector-feature-page-tools-enabled.vector-feature-main-menu-pinned-disabled .vector-toc-pinned & {
|
|
// Align TOC with bottom of title when main menu is not pinned but the TOC is
|
|
margin-top: @margin-top-pinned-toc;
|
|
}
|
|
|
|
// 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
|
|
.vector-toc {
|
|
max-height: ~'calc( 100vh - @{max-height-bottom-spacing-scroll-indicator} )';
|
|
|
|
.mixin-vector-scroll-indicator();
|
|
}
|
|
|
|
.vector-feature-page-tools-disabled & .vector-toc {
|
|
padding-top: ~'calc( @{padding-top-pinned-element} + @{padding-top-tabs} )';
|
|
}
|
|
|
|
.vector-feature-page-tools-enabled & .vector-toc {
|
|
padding-top: @padding-top-pinned-element;
|
|
padding-left: @spacing-subsection-toggle;
|
|
padding-right: @padding-horizontal-dropdown-menu-item;
|
|
}
|
|
}
|
|
}
|