mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-10-03 20:20:35 +00:00
Fix wide content overflowing hint blocks (#4320)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"gitbook": patch
|
||||
---
|
||||
|
||||
Fix wide content (such as code blocks and tables) overflowing the edges of hint blocks instead of scrolling within them.
|
||||
@@ -92,6 +92,11 @@ export async function Hint({
|
||||
'empty:p-0',
|
||||
'-row-end-1',
|
||||
'-col-end-1',
|
||||
// Allow the grid track to shrink below its content's min-content size so wide
|
||||
// nested blocks (e.g. code blocks, tables) scroll internally instead of
|
||||
// overflowing the hint. Without this, the `1fr` column keeps its default
|
||||
// `min-width: auto` and grows past the hint's width.
|
||||
'min-w-0',
|
||||
'space-y-3',
|
||||
'[&_.hint]:border',
|
||||
'[&_pre]:border',
|
||||
|
||||
Reference in New Issue
Block a user