mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-13 16:38:44 +00:00
b55d95c70c
Replacing the legacy Vector breakpoint tokens with the Codex standard ones. All names have been unified, only some legacy values remain for backwards compatibility. Also - replacing a wrongly applied min-width with the correct max-width token, - replacing a width with an equal value min-width one and - removing the now equal value mobile min-width one. Note that we can't do some reference magic here alike `@max-width-breakpoint-mobile: @min-width-breakpoint-tablet - 1px;` as this would take the Codex value from skin variables and not the legacy value. Also note, that we could move all those Vector legacy definitions into Vector's 'mediawiki.skin.variables.less' file(s), but that would mean that extensions don't rely on the Codex default values, but on Vector's and we want latter to move to the standard, also in foresight of further standardization to build for all feature teams like a shared Grid. Bug: T331403 Change-Id: Ifb968b1977001edb1a79e20df387c61f27043542
50 lines
2 KiB
Plaintext
50 lines
2 KiB
Plaintext
@import '../../variables.less';
|
|
@import '../../mixins.less';
|
|
|
|
.mw-table-of-contents-container {
|
|
// Needed for Grid-based layout
|
|
align-self: start;
|
|
height: 100%;
|
|
}
|
|
|
|
@media ( min-width: @min-width-breakpoint-desktop ) {
|
|
&.vector-feature-toc-pinned-clientpref-1 #mw-panel-toc {
|
|
// 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;
|
|
// Align the left edge of the TOC text with the page container
|
|
margin-left: -@spacing-subsection-toggle;
|
|
}
|
|
|
|
#vector-toc-pinned-container {
|
|
position: sticky;
|
|
top: 0;
|
|
}
|
|
|
|
&.vector-feature-toc-pinned-clientpref-1 #vector-toc-pinned-container {
|
|
// Default spacing separating the sidebar TOC from the main menu.
|
|
margin-top: 1.5em;
|
|
}
|
|
|
|
// FIXME: Remove vector-feature-toc-pinned-(enabled|disabled) when cache allows.
|
|
&.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-clientpref-1 #vector-toc-pinned-container,
|
|
&.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-enabled #vector-toc-pinned-container {
|
|
// 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-pinned-container .vector-toc {
|
|
max-height: ~'calc( 100vh - @{max-height-bottom-spacing-scroll-indicator} )';
|
|
padding-top: @padding-top-pinned-element;
|
|
padding-left: @spacing-subsection-toggle;
|
|
padding-right: @padding-horizontal-dropdown-menu-item;
|
|
.mixin-vector-scroll-indicator();
|
|
}
|
|
}
|