Skip to content

Commit 6aa3ff9

Browse files
authored
Fix various styling issues (#3283)
1 parent 7d3fe23 commit 6aa3ff9

File tree

7 files changed

+17
-6
lines changed

7 files changed

+17
-6
lines changed

.changeset/big-gorillas-perform.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Fix three small visual issues
6+
7+
- Fix sidebar showing on `no-toc` pages in the gradient theme
8+
- Fix variant selector truncating incorrectly in header when sections are present
9+
- Fix page cover alignment on `lg` screens without TOC

packages/gitbook/src/components/DocumentView/Caption.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function Caption(
4242
'after:pointer-events-none',
4343
fit ? 'w-fit' : null,
4444
withBorder
45-
? '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'
45+
? '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'
4646
: null,
4747
],
4848
style,

packages/gitbook/src/components/DocumentView/StepperStep.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ export function StepperStep(props: BlockProps<DocumentBlockStepperStep>) {
3434
<div className="relative select-none">
3535
<div
3636
className={tcls(
37-
'can-override-bg can-override-text flex size-[calc(1.75rem+1px)] items-center justify-center rounded-full bg-primary-subtle tabular-nums',
38-
'font-medium text-primary'
37+
'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',
38+
'font-medium text-contrast-primary-solid theme-muted:text-primary'
3939
)}
4040
>
4141
{index + 1}
4242
</div>
43-
<div className="can-override-bg absolute top-9 bottom-2 left-[0.875rem] w-px bg-primary-subtle" />
43+
<div className="can-override-bg absolute top-9 bottom-2 left-[0.875rem] w-px bg-primary-7 theme-muted:bg-primary-subtle" />
4444
</div>
4545
<Blocks
4646
{...contextProps}

packages/gitbook/src/components/Header/SpacesDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function SpacesDropdown(props: {
6262
className
6363
)}
6464
>
65-
<span className={tcls('line-clamp-1', 'grow')}>{siteSpace.title}</span>
65+
<span className={tcls('truncate', 'grow')}>{siteSpace.title}</span>
6666
<DropdownChevron />
6767
</div>
6868
}

packages/gitbook/src/components/PageBody/PageCover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function PageCover(props: {
3737
'lg:ml-0',
3838
!page.layout.tableOfContents &&
3939
context.customization.header.preset !== 'none'
40-
? 'lg:-ml-64'
40+
? 'xl:-ml-64'
4141
: null,
4242
]
4343
: ['sm:mx-auto', 'max-w-3xl', 'sm:rounded-md', 'mb-8']

packages/gitbook/src/components/PageBody/PageFooterNavigation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ function NavigationCard(
107107
'border',
108108
'border-tint-subtle',
109109
'rounded',
110+
'circular-corners:rounded-2xl',
110111
'straight-corners:rounded-none',
111112
'hover:border-primary',
112113
'text-pretty',

packages/gitbook/src/components/TableOfContents/TableOfContents.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export function TableOfContents(props: {
8484
'[html.sidebar-filled.theme-bold.tint_&]:bg-tint-base',
8585
'[html.sidebar-filled.theme-gradient_&]:border',
8686
'page-no-toc:!bg-transparent',
87+
'page-no-toc:!border-none',
8788

8889
'sidebar-filled:rounded-xl',
8990
'straight-corners:rounded-none',

0 commit comments

Comments
 (0)