From bd9a3671e5b30ab59557d0606eadd2c96340a85e Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Tue, 18 Mar 2025 18:08:28 +0100 Subject: [PATCH 1/6] Update lists margin top --- packages/gitbook/src/components/DocumentView/List.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gitbook/src/components/DocumentView/List.tsx b/packages/gitbook/src/components/DocumentView/List.tsx index 7464b1da86..748757b03b 100644 --- a/packages/gitbook/src/components/DocumentView/List.tsx +++ b/packages/gitbook/src/components/DocumentView/List.tsx @@ -21,7 +21,8 @@ export function List( tag={getListTag(block.type)} nodes={block.nodes} ancestorBlocks={[...ancestorBlocks, block]} - style={['min-w-0 space-y-2', style]} + // `-mt-4` because we apply a `mt-5` to all blocks but we only want a margin top of 6px for lists + style={['min-w-0 space-y-2 -mt-4', style]} /> ); } From 0acc1c497bc65cfd1aaada6eb6d7f7f3f60f127e Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Tue, 18 Mar 2025 18:43:42 +0100 Subject: [PATCH 2/6] Update --- packages/gitbook/src/components/DocumentView/List.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gitbook/src/components/DocumentView/List.tsx b/packages/gitbook/src/components/DocumentView/List.tsx index 748757b03b..a4de0fd508 100644 --- a/packages/gitbook/src/components/DocumentView/List.tsx +++ b/packages/gitbook/src/components/DocumentView/List.tsx @@ -22,7 +22,7 @@ export function List( nodes={block.nodes} ancestorBlocks={[...ancestorBlocks, block]} // `-mt-4` because we apply a `mt-5` to all blocks but we only want a margin top of 6px for lists - style={['min-w-0 space-y-2 -mt-4', style]} + style={[style, 'min-w-0 space-y-2 -mt-4']} /> ); } From dda46c108643d9f668c24995702499f4dfd48556 Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Tue, 18 Mar 2025 19:02:55 +0100 Subject: [PATCH 3/6] Update --- packages/gitbook/src/components/DocumentView/List.tsx | 3 +-- packages/gitbook/src/components/PageBody/PageBody.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/gitbook/src/components/DocumentView/List.tsx b/packages/gitbook/src/components/DocumentView/List.tsx index a4de0fd508..7464b1da86 100644 --- a/packages/gitbook/src/components/DocumentView/List.tsx +++ b/packages/gitbook/src/components/DocumentView/List.tsx @@ -21,8 +21,7 @@ export function List( tag={getListTag(block.type)} nodes={block.nodes} ancestorBlocks={[...ancestorBlocks, block]} - // `-mt-4` because we apply a `mt-5` to all blocks but we only want a margin top of 6px for lists - style={[style, 'min-w-0 space-y-2 -mt-4']} + style={['min-w-0 space-y-2', style]} /> ); } diff --git a/packages/gitbook/src/components/PageBody/PageBody.tsx b/packages/gitbook/src/components/PageBody/PageBody.tsx index 84213777a9..15708943e1 100644 --- a/packages/gitbook/src/components/PageBody/PageBody.tsx +++ b/packages/gitbook/src/components/PageBody/PageBody.tsx @@ -72,7 +72,7 @@ export function PageBody(props: { > *+*]:mt-5', 'grid']} + style={['[&>*+*]:mt-5','[&>ul+*]:mt-1', '[&>ol+*]:mt-1', 'grid']} blockStyle={['page-api-block:ml-0']} context={{ mode: 'default', From 6f8a80712b5747a99f380ba4fe625dcebc32036a Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Tue, 18 Mar 2025 19:09:31 +0100 Subject: [PATCH 4/6] update --- packages/gitbook/src/components/PageBody/PageBody.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gitbook/src/components/PageBody/PageBody.tsx b/packages/gitbook/src/components/PageBody/PageBody.tsx index 15708943e1..7770bc8e5f 100644 --- a/packages/gitbook/src/components/PageBody/PageBody.tsx +++ b/packages/gitbook/src/components/PageBody/PageBody.tsx @@ -72,7 +72,7 @@ export function PageBody(props: { > *+*]:mt-5','[&>ul+*]:mt-1', '[&>ol+*]:mt-1', 'grid']} + style={['[&>*+*]:mt-5','[&>ul*]:mt-1.5', '[&>ol*]:mt-1.5', 'grid']} blockStyle={['page-api-block:ml-0']} context={{ mode: 'default', From ce9dc0560e4fc26f1913d865f6dd55176af2b696 Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Tue, 18 Mar 2025 20:38:51 +0100 Subject: [PATCH 5/6] update --- packages/gitbook/src/components/PageBody/PageBody.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gitbook/src/components/PageBody/PageBody.tsx b/packages/gitbook/src/components/PageBody/PageBody.tsx index 7770bc8e5f..62f470d47b 100644 --- a/packages/gitbook/src/components/PageBody/PageBody.tsx +++ b/packages/gitbook/src/components/PageBody/PageBody.tsx @@ -72,7 +72,7 @@ export function PageBody(props: { > *+*]:mt-5','[&>ul*]:mt-1.5', '[&>ol*]:mt-1.5', 'grid']} + style={['[&>*+*]:mt-5', '[&>*:is(ul,ol)]:mt-1.5', 'grid']} blockStyle={['page-api-block:ml-0']} context={{ mode: 'default', From 9e11b009f67089fd928b3d04a719f3626bb1b4b2 Mon Sep 17 00:00:00 2001 From: Claire Chabas Date: Tue, 18 Mar 2025 20:44:23 +0100 Subject: [PATCH 6/6] update --- packages/gitbook/src/components/PageBody/PageBody.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gitbook/src/components/PageBody/PageBody.tsx b/packages/gitbook/src/components/PageBody/PageBody.tsx index 62f470d47b..73e0167053 100644 --- a/packages/gitbook/src/components/PageBody/PageBody.tsx +++ b/packages/gitbook/src/components/PageBody/PageBody.tsx @@ -72,7 +72,7 @@ export function PageBody(props: { > *+*]:mt-5', '[&>*:is(ul,ol)]:mt-1.5', 'grid']} + style={['[&>*+*]:mt-5', '[&>*:is(ul,ol)]:mt-2', 'grid']} blockStyle={['page-api-block:ml-0']} context={{ mode: 'default',