From 279bd42f753936eb96159dd62b0f96b0f7bc8f1f Mon Sep 17 00:00:00 2001 From: Damian Stasik <920747+damianstasik@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:13:46 +0200 Subject: [PATCH] Reset the top margin of paragraphs and admonitions if they are first elements in markdown content --- frontend/src/components/Markdown/P.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Markdown/P.tsx b/frontend/src/components/Markdown/P.tsx index 22c81b85..55832980 100644 --- a/frontend/src/components/Markdown/P.tsx +++ b/frontend/src/components/Markdown/P.tsx @@ -57,7 +57,10 @@ export function MarkdownP({ children }: HTMLAttributes) { return (
&:first-child]:mt-0", className)} + className={clsx( + "mt-5 px-3 py-2 first:mt-0 [li>&:first-child]:mt-0", + className, + )} > {content} {remainingContent} @@ -66,7 +69,7 @@ export function MarkdownP({ children }: HTMLAttributes) { } return ( - + {children} );