Skip to content

Commit 5907bd9

Browse files
authored
Adjust hint spacing (#2873)
1 parent b66d04c commit 5907bd9

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.changeset/clean-meals-stare.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+
Adjust hint block spacing

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,21 @@ export function Hint(props: BlockProps<DocumentBlockHint>) {
3737
>
3838
<div
3939
className={tcls(
40-
'py-3',
41-
'pl-3',
42-
'-mt-px', // Bump icon up 1px for optical alignment with heading
40+
'py-4',
41+
'pl-4',
4342
hasHeading ? hintStyle.header : null,
4443
hintStyle.iconColor
4544
)}
4645
>
4746
<Icon
4847
icon={hintStyle.icon}
49-
className={tcls('size-[1.2em]', 'mt-0.5', firstLine.lineHeight)}
48+
className={tcls('size-[1.2em]', 'mt-px', firstLine.lineHeight)}
5049
/>
5150
</div>
5251
{hasHeading ? (
5352
<Block
5453
style={tcls(
55-
'flip-heading-hash p-3 text-[1em] *:mt-0',
54+
'flip-heading-hash p-4 pl-3 text-[1em] *:mt-0',
5655
hasHeading ? hintStyle.header : null
5756
)}
5857
ancestorBlocks={[...ancestorBlocks, block]}
@@ -70,11 +69,12 @@ export function Hint(props: BlockProps<DocumentBlockHint>) {
7069
'flip-heading-hash'
7170
)}
7271
style={[
73-
'p-3',
72+
'p-4',
73+
'pl-3',
7474
'empty:p-0',
7575
'-row-end-1',
7676
'-col-end-1',
77-
'space-y-4',
77+
'space-y-3',
7878
'[&_.hint]:border',
7979
'[&_pre]:border',
8080
'[&_pre]:border-neutral',

0 commit comments

Comments
 (0)