From e653d4a214edfe32894312f74ee64f24549bb2f7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 17:37:07 +0000 Subject: [PATCH 1/2] Fix Stepper heading alignment and overflow-menu separator on mobile Make the StepperStep negative top-margin responsive on the same @xs/@lg container breakpoints the heading text uses, so the number circle centers on the heading's first line on narrow containers instead of being pulled above it. Desktop (@lg) values are unchanged. Guard the HeaderLinkMore overflow-menu separator on links.length > 0 so a leading divider is not rendered on sites with social links but no header links. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01CcQvux7xUEEiGCKRsfm79k --- .../gitbook/src/components/DocumentView/StepperStep.tsx | 6 +++--- packages/gitbook/src/components/Header/HeaderLinkMore.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/gitbook/src/components/DocumentView/StepperStep.tsx b/packages/gitbook/src/components/DocumentView/StepperStep.tsx index 1abdfe9170..6287a6b596 100644 --- a/packages/gitbook/src/components/DocumentView/StepperStep.tsx +++ b/packages/gitbook/src/components/DocumentView/StepperStep.tsx @@ -21,11 +21,11 @@ export function StepperStep(props: BlockProps) { } switch (firstChild.type) { case 'heading-1': - return '-mt-9'; + return '-mt-[18px] @xs:-mt-[24px] @lg:-mt-9'; case 'heading-2': - return '-mt-[calc(1.25rem+1px)]'; + return '-mt-[11px] @xs:-mt-[14px] @lg:-mt-[calc(1.25rem+1px)]'; case 'heading-3': - return '-mt-[calc(0.50rem+1px)]'; + return '-mt-[5px] @xs:-mt-[7px] @lg:-mt-[calc(0.50rem+1px)]'; default: return ''; } diff --git a/packages/gitbook/src/components/Header/HeaderLinkMore.tsx b/packages/gitbook/src/components/Header/HeaderLinkMore.tsx index e4456682ac..e5336ece6c 100644 --- a/packages/gitbook/src/components/Header/HeaderLinkMore.tsx +++ b/packages/gitbook/src/components/Header/HeaderLinkMore.tsx @@ -45,7 +45,7 @@ export function HeaderLinkMore(props: { {links.map((link, index) => ( ))} - {socialAccounts.length > 0 && } + {links.length > 0 && socialAccounts.length > 0 && } {socialAccounts.map((account) => ( Date: Wed, 5 Aug 2026 17:41:39 +0000 Subject: [PATCH 2/2] Add changeset for Stepper mobile alignment and overflow separator fix --- .changeset/slow-steps-align.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slow-steps-align.md diff --git a/.changeset/slow-steps-align.md b/.changeset/slow-steps-align.md new file mode 100644 index 0000000000..cca982d121 --- /dev/null +++ b/.changeset/slow-steps-align.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Fix Stepper heading alignment and overflow-menu separator on mobile