From 4710f9fbd55e2be6dd4c70252accc5f11fd4782f Mon Sep 17 00:00:00 2001 From: Tom Rees-Herdman Date: Fri, 23 Oct 2026 11:51:05 +0100 Subject: [PATCH 1/2] Make chips sticky. --- .../_googlesitekit-category-filter-chips.scss | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss b/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss index 36019225057..c22d2475c40 100644 --- a/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss +++ b/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss @@ -19,7 +19,40 @@ .googlesitekit-plugin { .googlesitekit-category-filter-chips { - margin-top: 32px; + background-color: $c-base; + + // Padding gives the chips breathing room over the content scrolling + // beneath them while stuck; the margins offset it so the resting + // layout is unchanged. + margin-block: 24px -8px; + padding-block: 8px; + position: sticky; + + // Sits directly below the sticky Site Kit header. + top: 68px; + z-index: 10; + + body.googlesitekit-showing-feature-tour &, + body.googlesitekit-showing-tooltip & { + position: static; + } + + // Offsets match `.googlesitekit-navigation`, which sticks below the + // same header. + body.admin-bar & { + + @media (min-width: $width-tablet + 1 + px) { + top: 114px; + } + + @media (min-width: $bp-wpAdminBarTablet) { + top: 100px; + } + + @media (min-width: $width-desktop + 1 + px) { + top: 116px; + } + } .googlesitekit-chip-multi-select { gap: 10px; From bf1809f547462d460ab384dcf2984212fbf8c5b9 Mon Sep 17 00:00:00 2001 From: Tom Rees-Herdman Date: Fri, 23 Oct 2026 12:03:20 +0100 Subject: [PATCH 2/2] Make tabs sticky. --- .../_googlesitekit-category-filter-chips.scss | 21 ++---------- .../_googlesitekit-feature-discovery.scss | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss b/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss index c22d2475c40..c89c95f538a 100644 --- a/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss +++ b/assets/sass/components/feature-discovery/_googlesitekit-category-filter-chips.scss @@ -28,8 +28,8 @@ padding-block: 8px; position: sticky; - // Sits directly below the sticky Site Kit header. - top: 68px; + // Sits directly below the sticky feature discovery tab bar. + top: calc(var(--googlesitekit-feature-discovery-sticky-top) + var(--googlesitekit-feature-discovery-tab-bar-height)); z-index: 10; body.googlesitekit-showing-feature-tour &, @@ -37,23 +37,6 @@ position: static; } - // Offsets match `.googlesitekit-navigation`, which sticks below the - // same header. - body.admin-bar & { - - @media (min-width: $width-tablet + 1 + px) { - top: 114px; - } - - @media (min-width: $bp-wpAdminBarTablet) { - top: 100px; - } - - @media (min-width: $width-desktop + 1 + px) { - top: 116px; - } - } - .googlesitekit-chip-multi-select { gap: 10px; } diff --git a/assets/sass/components/feature-discovery/_googlesitekit-feature-discovery.scss b/assets/sass/components/feature-discovery/_googlesitekit-feature-discovery.scss index 64134888c2d..78e8e8cc7ac 100644 --- a/assets/sass/components/feature-discovery/_googlesitekit-feature-discovery.scss +++ b/assets/sass/components/feature-discovery/_googlesitekit-feature-discovery.scss @@ -26,6 +26,27 @@ --googlesitekit-feature-discovery-padding-m: 36px; --googlesitekit-feature-discovery-padding-l: 48px; } + + // The tab bar sticks directly below the sticky Site Kit header, and the + // All services category chips stick below the tab bar. Offsets match + // `.googlesitekit-navigation`, which sticks below the same header. + --googlesitekit-feature-discovery-sticky-top: 68px; + --googlesitekit-feature-discovery-tab-bar-height: 57px; // 56px tabs + 1px border. + + body.admin-bar & { + + @media (min-width: $width-tablet + 1 + px) { + --googlesitekit-feature-discovery-sticky-top: 114px; + } + + @media (min-width: $bp-wpAdminBarTablet) { + --googlesitekit-feature-discovery-sticky-top: 100px; + } + + @media (min-width: $width-desktop + 1 + px) { + --googlesitekit-feature-discovery-sticky-top: 116px; + } + } } .googlesitekit-feature-discovery__header { @@ -40,6 +61,18 @@ padding-inline: var(--googlesitekit-feature-discovery-padding-m); } + .googlesitekit-feature-discovery__tab-bar { + background-color: $c-base; + position: sticky; + top: var(--googlesitekit-feature-discovery-sticky-top); + z-index: 10; + + body.googlesitekit-showing-feature-tour &, + body.googlesitekit-showing-tooltip & { + position: static; + } + } + .googlesitekit-feature-discovery__content { min-block-size: 546px; padding-block: 0 var(--googlesitekit-feature-discovery-padding-l);