mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-20 19:52:48 +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
121 lines
2.7 KiB
Plaintext
121 lines
2.7 KiB
Plaintext
@import '../../variables.less';
|
|
@import '../../mixins.less';
|
|
|
|
// TOC dropdown styles
|
|
.vector-sticky-header-toc,
|
|
.vector-page-titlebar-toc {
|
|
display: none;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
// TOC styles when unpinned
|
|
.mixin-toc-unpinned() {
|
|
display: block;
|
|
|
|
.vector-dropdown-content {
|
|
// Override default dropdown max width
|
|
max-width: none;
|
|
}
|
|
|
|
// Shared unpinned TOC styles, applies across all unpinned cases (page titlebar, sticky header, floating)
|
|
.vector-toc {
|
|
// T316056 Remove TOC menu fixed width and apply min/max-width
|
|
width: max-content;
|
|
min-width: 200px;
|
|
// Collapsed TOC should be smaller than 85% of the content container (51em) and 75vw
|
|
max-width: ~'min( 0.85 * @{max-width-content-container}, 75vw )'; // min( 51em, 75vw )
|
|
|
|
// Adjust TOC spacing when unpinned
|
|
.vector-pinnable-header {
|
|
padding-left: @padding-horizontal-dropdown-menu-item + @spacing-subsection-toggle;
|
|
}
|
|
|
|
.vector-toc-contents {
|
|
padding-right: @padding-horizontal-dropdown-menu-item;
|
|
padding-left: @padding-horizontal-dropdown-menu-item + @spacing-subsection-toggle;
|
|
}
|
|
}
|
|
}
|
|
|
|
// TOC styles when below page title
|
|
.mixin-toc-below-page-title {
|
|
position: fixed;
|
|
top: 12px;
|
|
left: 12px;
|
|
margin: 0;
|
|
z-index: @z-index-dropdown;
|
|
}
|
|
|
|
&.client-js {
|
|
@media ( max-width: @max-width-breakpoint-tablet ) {
|
|
//
|
|
// TOC in page titlebar on narrow screens
|
|
//
|
|
.vector-page-titlebar-toc {
|
|
.mixin-toc-unpinned();
|
|
}
|
|
|
|
//
|
|
// TOC in page titlebar on narrow screens below page title
|
|
//
|
|
.vector-below-page-title .vector-page-titlebar-toc {
|
|
.mixin-toc-below-page-title();
|
|
}
|
|
}
|
|
|
|
@media ( min-width: @min-width-breakpoint-desktop ) {
|
|
//
|
|
// TOC in page titlebar
|
|
//
|
|
&.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ) {
|
|
.vector-page-titlebar-toc {
|
|
.mixin-toc-unpinned();
|
|
}
|
|
}
|
|
|
|
//
|
|
// TOC in page titlebar below page title
|
|
//
|
|
&.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ).vector-below-page-title {
|
|
.vector-page-titlebar-toc {
|
|
.mixin-toc-below-page-title();
|
|
}
|
|
}
|
|
|
|
//
|
|
// TOC in sticky header
|
|
//
|
|
&.vector-feature-toc-pinned-clientpref-0 .vector-sticky-header-visible {
|
|
.vector-sticky-header-toc {
|
|
.mixin-toc-unpinned();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.client-nojs {
|
|
//
|
|
// No-JS TOC in page titlebar
|
|
//
|
|
&.vector-feature-toc-pinned-clientpref-0 {
|
|
.vector-page-titlebar-toc {
|
|
.mixin-toc-unpinned();
|
|
}
|
|
}
|
|
|
|
//
|
|
// Applies simplified TOC styles to No-JS pinned TOC on narrow viewports
|
|
//
|
|
@media ( max-width: @max-width-breakpoint-tablet ) {
|
|
&.vector-feature-toc-pinned-clientpref-1 {
|
|
.vector-sticky-pinned-container {
|
|
position: static;
|
|
}
|
|
|
|
.vector-toc {
|
|
max-height: 200px;
|
|
}
|
|
}
|
|
}
|
|
}
|