Skip to content

Fix various styling issues #3283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/big-gorillas-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"gitbook": patch
---

Fix three small visual issues

- Fix sidebar showing on `no-toc` pages in the gradient theme
- Fix variant selector truncating incorrectly in header when sections are present
- Fix page cover alignment on `lg` screens without TOC
2 changes: 1 addition & 1 deletion packages/gitbook/src/components/DocumentView/Caption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function Caption(
'after:pointer-events-none',
fit ? 'w-fit' : null,
withBorder
? 'rounded straight-corners:rounded-none after:border-tint-subtle after:border after:rounded straight-corners:after:rounded-none dark:after:mix-blend-plus-lighter after:pointer-events-none'
? 'rounded circular-corners:rounded-2xl straight-corners:rounded-none after:border-tint-subtle after:border after:rounded circular-corners:after:rounded-2xl straight-corners:after:rounded-none dark:after:mix-blend-plus-lighter after:pointer-events-none'
: null,
],
style,
Expand Down
6 changes: 3 additions & 3 deletions packages/gitbook/src/components/DocumentView/StepperStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export function StepperStep(props: BlockProps<DocumentBlockStepperStep>) {
<div className="relative select-none">
<div
className={tcls(
'can-override-bg can-override-text flex size-[calc(1.75rem+1px)] items-center justify-center rounded-full bg-primary-subtle tabular-nums',
'font-medium text-primary'
'can-override-bg can-override-text flex size-[calc(1.75rem+1px)] items-center justify-center rounded-full bg-primary-solid theme-muted:bg-primary-subtle tabular-nums',
'font-medium text-contrast-primary-solid theme-muted:text-primary'
)}
>
{index + 1}
</div>
<div className="can-override-bg absolute top-9 bottom-2 left-[0.875rem] w-px bg-primary-subtle" />
<div className="can-override-bg absolute top-9 bottom-2 left-[0.875rem] w-px bg-primary-7 theme-muted:bg-primary-subtle" />
</div>
<Blocks
{...contextProps}
Expand Down
2 changes: 1 addition & 1 deletion packages/gitbook/src/components/Header/SpacesDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function SpacesDropdown(props: {
className
)}
>
<span className={tcls('line-clamp-1', 'grow')}>{siteSpace.title}</span>
<span className={tcls('truncate', 'grow')}>{siteSpace.title}</span>
<DropdownChevron />
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion packages/gitbook/src/components/PageBody/PageCover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function PageCover(props: {
'lg:ml-0',
!page.layout.tableOfContents &&
context.customization.header.preset !== 'none'
? 'lg:-ml-64'
? 'xl:-ml-64'
: null,
]
: ['sm:mx-auto', 'max-w-3xl', 'sm:rounded-md', 'mb-8']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function NavigationCard(
'border',
'border-tint-subtle',
'rounded',
'circular-corners:rounded-2xl',
'straight-corners:rounded-none',
'hover:border-primary',
'text-pretty',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function TableOfContents(props: {
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base',
'[html.sidebar-filled.theme-gradient_&]:border',
'page-no-toc:!bg-transparent',
'page-no-toc:!border-none',

'sidebar-filled:rounded-xl',
'straight-corners:rounded-none',
Expand Down