Skip to content

Commit 2ba7e54

Browse files
authored
Fix headings styles in hint block (#3497)
1 parent 0a858e7 commit 2ba7e54

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.changeset/many-moons-shave.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+
Fix headings styles in hint block

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export function Heading(props: BlockProps<DocumentBlockHeading>) {
4646
'flex-1',
4747
'z-[1]',
4848
'justify-self-start',
49+
'max-w-full',
50+
'break-words',
4951
getTextAlignment(block.data.align),
5052
textStyle.lineHeight
5153
)}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ export function Hint(props: BlockProps<DocumentBlockHint>) {
5252
{hasHeading ? (
5353
<Block
5454
style={tcls(
55-
'flip-heading-hash !py-4 items-start px-4 pl-3 text-[1em] *:flex-none',
56-
hasHeading ? hintStyle.header : null
55+
'!py-4 w-full items-start pl-3 text-[1em] *:flex-none',
56+
// Heading hash styles
57+
'flip-heading-hash pr-8',
58+
hintStyle.header
5759
)}
5860
ancestorBlocks={[...ancestorBlocks, block]}
5961
{...contextProps}

0 commit comments

Comments
 (0)