mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-14 08:51:32 +00:00
3aaf8666cd
This removes CSS selectors associated with the Page tools feature flag, i.e. `vector-feature-page-tools-disabled` as well as `vector-feature-page-tools-enabled` by removing the 'disabled' styles and integrating the 'enabled' styles into the default page tools code. Bug: T332090 Change-Id: I382e12ca7ce741a3071582ffa84da03c2ba9e343
51 lines
1.8 KiB
Plaintext
51 lines
1.8 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-feature-toc-pinned-enabled & {
|
|
// 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 {
|
|
// stylelint-disable-next-line plugin/no-unsupported-browser-features
|
|
position: sticky;
|
|
top: 0;
|
|
|
|
.vector-feature-toc-pinned-enabled & {
|
|
// Default spacing separating the sidebar TOC from the main menu.
|
|
margin-top: 1.5em;
|
|
}
|
|
|
|
.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-enabled & {
|
|
// 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} )';
|
|
padding-top: @padding-top-pinned-element;
|
|
padding-left: @spacing-subsection-toggle;
|
|
padding-right: @padding-horizontal-dropdown-menu-item;
|
|
.mixin-vector-scroll-indicator();
|
|
}
|
|
}
|
|
}
|