diff --git a/resources/skins.vector.zebra.styles/components/TableOfContents.less b/resources/skins.vector.zebra.styles/components/TableOfContents.less index e130d7007..a17ebd303 100644 --- a/resources/skins.vector.zebra.styles/components/TableOfContents.less +++ b/resources/skins.vector.zebra.styles/components/TableOfContents.less @@ -113,7 +113,7 @@ &.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ) .vector-page-titlebar, &.vector-feature-toc-pinned-clientpref-0 .vector-sticky-header-visible .vector-sticky-header-context-bar, -&.vector-feature-toc-pinned-clientpref-1 .mw-page-container-inner { +&.vector-feature-toc-pinned-clientpref-1 .vector-column-start { > .vector-toc-landmark { display: block; } diff --git a/resources/skins.vector.zebra.styles/layouts/grid.less b/resources/skins.vector.zebra.styles/layouts/grid.less index aaaf991f0..523ea596a 100644 --- a/resources/skins.vector.zebra.styles/layouts/grid.less +++ b/resources/skins.vector.zebra.styles/layouts/grid.less @@ -6,12 +6,11 @@ .mw-page-container-inner { display: grid; column-gap: @grid-column-gap; - grid-template: ~'min-content min-content 1fr min-content / @{grid-template-column-desktop}'; + grid-template: ~'min-content 1fr min-content / @{grid-template-column-desktop}'; // stylelint-disable-next-line stylistic/declaration-colon-space-after grid-template-areas: 'siteNotice siteNotice' - 'mainMenu pageContent' - 'toc pageContent' + 'columnStart pageContent' 'footer footer'; } @@ -19,13 +18,8 @@ grid-area: siteNotice; } - .mw-table-of-contents-container { - grid-area: toc; - overflow-anchor: none; // T330108 - } - - .vector-main-menu-container { - grid-area: mainMenu; + .vector-column-start { + grid-area: columnStart; overflow-anchor: none; // T330108 } @@ -67,12 +61,17 @@ } } -// Horizontally center content when column start is empty (i.e. no pinned ToC or pinned main menu) -&.vector-feature-main-menu-pinned-disabled.vector-toc-not-available .mw-content-container, -&.vector-feature-main-menu-pinned-disabled .vector-sidebar-container-no-toc ~ .mw-content-container, -&.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-clientpref-0 .mw-content-container { - grid-column: mainMenu / pageContent; +// Single column grid when column start is empty (i.e. no pinned ToC or pinned main menu) +&.vector-feature-main-menu-pinned-disabled.vector-toc-not-available .mw-page-container-inner, +&.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-clientpref-0 .mw-page-container-inner { + grid-template-columns: @width-page-content; + // stylelint-disable-next-line stylistic/declaration-colon-space-after + grid-template-areas: + 'siteNotice' + 'pageContent' + 'footer'; + // Horizontally center content when single column .mw-body { justify-content: center; } diff --git a/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less b/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less index 3cf63e308..15555def1 100644 --- a/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less +++ b/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less @@ -124,7 +124,7 @@ z-index: @z-index-dropdown; } - @{selector-nojs-collapsed-toc-open} ~ .mw-table-of-contents-container .vector-toc { + @{selector-nojs-collapsed-toc-open} ~ .vector-toc-landmark .vector-toc { // Hide the TOC when the button is not checked display: block; }