From 09781a5a96b3930fd7f87415f5cb611ef1372e17 Mon Sep 17 00:00:00 2001 From: bwang Date: Mon, 18 Sep 2023 10:51:28 -0500 Subject: [PATCH] [anon prefs] Update TOC pin/unpin classes for Zebra Change-Id: I15cc4597d75a18f07bf96491df7a21113b0376ba --- .../components/TableOfContents.less | 6 +++--- resources/skins.vector.zebra.styles/layouts/grid.less | 2 +- .../skins.vector.zebra.styles/layouts/toc/pinned.less | 2 +- .../layouts/toc/unpinned.less | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/skins.vector.zebra.styles/components/TableOfContents.less b/resources/skins.vector.zebra.styles/components/TableOfContents.less index 5e0468a1e..e130d7007 100644 --- a/resources/skins.vector.zebra.styles/components/TableOfContents.less +++ b/resources/skins.vector.zebra.styles/components/TableOfContents.less @@ -111,9 +111,9 @@ display: none; } -&.vector-feature-toc-pinned-disabled body:not( .vector-sticky-header-visible ) .vector-page-titlebar, -&.vector-feature-toc-pinned-disabled .vector-sticky-header-visible .vector-sticky-header-context-bar, -&.vector-feature-toc-pinned-enabled .mw-page-container-inner { +&.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-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 1a525cbdf..beafeda61 100644 --- a/resources/skins.vector.zebra.styles/layouts/grid.less +++ b/resources/skins.vector.zebra.styles/layouts/grid.less @@ -73,7 +73,7 @@ // Horizontally center content when column start is empty (i.e. no pinned ToC or pinned main menu) &.vector-feature-main-menu-pinned-disabled .vector-sidebar-container-no-toc ~ .mw-content-container, -&.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-disabled .mw-content-container { +&.vector-feature-main-menu-pinned-disabled.vector-feature-toc-pinned-clientpref-0 .mw-content-container { grid-column: mainMenu / pageContent; .mw-body { diff --git a/resources/skins.vector.zebra.styles/layouts/toc/pinned.less b/resources/skins.vector.zebra.styles/layouts/toc/pinned.less index b5721e600..a700ac473 100644 --- a/resources/skins.vector.zebra.styles/layouts/toc/pinned.less +++ b/resources/skins.vector.zebra.styles/layouts/toc/pinned.less @@ -3,7 +3,7 @@ align-self: start; } -&.vector-feature-toc-pinned-enabled #mw-panel-toc { +&.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 diff --git a/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less b/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less index f9143503f..3cf63e308 100644 --- a/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less +++ b/resources/skins.vector.zebra.styles/layouts/toc/unpinned.less @@ -57,7 +57,7 @@ // // TOC in page titlebar // - &.vector-feature-toc-pinned-disabled body:not( .vector-sticky-header-visible ) { + &.vector-feature-toc-pinned-clientpref-0 body:not( .vector-sticky-header-visible ) { .vector-page-titlebar-toc { .mixin-toc-unpinned(); } @@ -66,7 +66,7 @@ // // TOC in page titlebar below page title // - &.vector-feature-toc-pinned-disabled body:not( .vector-sticky-header-visible ).vector-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(); } @@ -75,7 +75,7 @@ // // TOC in sticky header // - &.vector-feature-toc-pinned-disabled .vector-sticky-header-visible { + &.vector-feature-toc-pinned-clientpref-0 .vector-sticky-header-visible { .vector-sticky-header-toc { .mixin-toc-unpinned(); } @@ -87,7 +87,7 @@ // // No-JS TOC in page titlebar // - &.vector-feature-toc-pinned-disabled { + &.vector-feature-toc-pinned-clientpref-0 { .vector-page-titlebar-toc { .mixin-toc-unpinned(); } @@ -100,7 +100,7 @@ // Make the TOC appear in the page titlebar on small viewports // even when the TOC location in the DOM is actually in the sidebar // This case only happens for no-js anon users. - &.vector-feature-toc-pinned-enabled { + &.vector-feature-toc-pinned-clientpref-1 { #vector-toc-collapsed-button { display: block; }