Skip to content

Commit 511f1cf

Browse files
authored
Add scroll margin to Expandable (#3723)
1 parent 46fa9d9 commit 511f1cf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/seven-jokes-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'gitbook': patch
3+
---
4+
5+
Add scroll margin to Expandable

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export function Expandable(props: BlockProps<DocumentBlockExpandable>) {
2525
id = context.getId ? context.getId(id) : id;
2626

2727
return (
28-
<Details id={id} open={context.mode === 'print'} className={style}>
28+
<Details
29+
id={id}
30+
open={context.mode === 'print'}
31+
className={tcls('scroll-mt-(--content-scroll-margin)', style)}
32+
>
2933
<summary
3034
className={tcls(
3135
'cursor-pointer',

0 commit comments

Comments
 (0)