Skip to content

Commit 6a10fbd

Browse files
committed
Update styles
1 parent 7b50d8f commit 6a10fbd

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function Caption(
7070
'text-xs',
7171
'text-center',
7272
'text-tint',
73-
withFrame ? 'mt-0.5 mb-2.5' : 'mt-2'
73+
withFrame ? 'mt-1 mb-2.5' : 'mt-2'
7474
)}
7575
>
7676
<Inlines

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ export function Images(props: BlockProps<DocumentBlockImages>) {
2525
align === 'right' && 'justify-end',
2626
align === 'left' && 'justify-start',
2727
hasMultipleImages && ['grid', 'grid-flow-col'],
28-
withFrame && ['rounded-2xl', 'border', 'border-neutral']
28+
withFrame && [
29+
'rounded-2xl',
30+
'border',
31+
'border-neutral',
32+
'relative',
33+
'overflow-hidden',
34+
]
2935
)}
3036
>
3137
{block.nodes.map((node: any, _i: number) => (
@@ -85,13 +91,16 @@ async function ImageBlock(props: {
8591
{withFrame && (
8692
<div
8793
className={tcls(
94+
'absolute',
8895
'-top-0.5',
8996
'-left-0.5',
90-
'absolute',
91-
'inset-px',
97+
'right-px',
98+
'bottom-px',
9299
'opacity-50',
100+
'dark:opacity-20',
93101
'bg-[length:24px_24px,24px_24px]',
94102
'bg-[linear-gradient(to_right,_rgb(234,235,238)_1px,_transparent_1px),linear-gradient(to_bottom,_rgb(234,235,238)_1px,_transparent_1px)]',
103+
'dark:bg-[linear-gradient(to_right,_rgb(122,128,139)_1px,_transparent_1px),linear-gradient(to_bottom,_rgb(122,128,139)_1px,_transparent_1px)]',
95104
'bg-repeat'
96105
)}
97106
/>
@@ -102,8 +111,8 @@ async function ImageBlock(props: {
102111
<div
103112
className={tcls(
104113
'pointer-events-none absolute inset-0 rounded-2xl',
105-
'shadow-[inset_0_0_10px_7px_rgba(255,255,255,0.9)]',
106-
'dark:shadow-[inset_0_0_10px_7px_rgba(21,23,28,0.9)]'
114+
'shadow-[inset_0_0_10px_10px_rgb(255,255,255)]',
115+
'dark:shadow-[inset_0_0_10px_10px_rgb(21,23,28)]'
107116
)}
108117
/>
109118
)}

0 commit comments

Comments
 (0)