mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcQvux7xUEEiGCKRsfm79k
This commit is contained in:
@@ -21,11 +21,11 @@ export function StepperStep(props: BlockProps<DocumentBlockStepperStep>) {
|
||||
}
|
||||
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 '';
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export function HeaderLinkMore(props: {
|
||||
{links.map((link, index) => (
|
||||
<MoreMenuLink key={index} link={link} context={context} />
|
||||
))}
|
||||
{socialAccounts.length > 0 && <DropdownMenuSeparator />}
|
||||
{links.length > 0 && socialAccounts.length > 0 && <DropdownMenuSeparator />}
|
||||
{socialAccounts.map((account) => (
|
||||
<SocialAccountLink
|
||||
key={`${account.platform}-${account.handle}`}
|
||||
|
||||
Reference in New Issue
Block a user