Skip to content

Commit 56c31c7

Browse files
Center-align inline images (#2609)
1 parent 2d1a71f commit 56c31c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export async function InlineImage(props: InlineProps<DocumentInlineImage>) {
2525

2626
return (
2727
/* Ensure images dont expand to the size of the container where this Image may be nested in. Now it's always nested in a size-restricted container */
28-
<span className={tcls(size !== 'line' ? ['inline-flex', 'max-w-[300px]'] : null)}>
28+
<span
29+
className={tcls(
30+
size !== 'line' ? ['inline-flex', 'max-w-[300px]', 'align-middle'] : null,
31+
)}
32+
>
2933
<Image
3034
alt={inline.data.caption ?? ''}
3135
sizes={await getImageSizes(size, src)}

0 commit comments

Comments
 (0)