fix(web): stop stacking mobile search and tab padding

Tuck the catalog tabs under the sticky search padding so the banner
gap stays, but search and Plugins/Templates tabs no longer add two
gaps on top of each other.
This commit is contained in:
CodingOnStar 2026-08-31 17:53:15 +08:00
parent 1eccdf60ed
commit 3030ff3e4e
2 changed files with 5 additions and 6 deletions

View File

@ -216,8 +216,7 @@ describe('Marketplace catalog tab handoff', () => {
).toBeCloseTo(
HOME_HEADER_HEIGHT_PX +
HOME_SEARCH_HEIGHT_PX +
HOME_SEARCH_MOBILE_PADDING_BOTTOM_PX +
24 /* .catalogTabsRegion padding-top */,
HOME_SEARCH_MOBILE_PADDING_BOTTOM_PX /* .catalogTabsRegion padding-top, tucked under search padding */,
)
await page.viewport(880, 800)

View File

@ -124,18 +124,18 @@
display: none;
}
/* Sit under the search row's padding-bottom so that gap is not stacked
on top of the tabs' own padding when this group pins. */
:global([data-marketplace-standalone]) .catalogNavigationGroup {
position: sticky;
z-index: 40;
display: block;
top: calc(
var(--home-header-height, 48px) + var(--home-search-height, 36px) +
var(--home-search-mobile-padding-bottom, 16px)
);
top: calc(var(--home-header-height, 48px) + var(--home-search-height, 36px));
background-color: var(--color-background-default);
}
:global([data-marketplace-standalone]) .catalogTabsRegion {
padding-top: var(--home-search-mobile-padding-bottom, 16px);
padding-right: 20px;
padding-left: 20px;
}