From d06cbb84f4af082f71b8e6abe5d3ba21db0883fd Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 16 Mar 2026 12:33:20 -0500 Subject: [PATCH] fix: increase top margin on markdown headers for better visual separation Headers were butting up against previous paragraphs too closely. Changed rendered markdown header selectors from :where() to direct element selectors to increase CSS specificity and beat Tailwind prose defaults. Bumped margin-top from 1.15rem to 1.75rem. Also added top margins to MDXEditor headers (h1: 1.4em, h2: 1.3em, h3: 1.2em) which previously had none. Co-Authored-By: Paperclip Co-Authored-By: Claude Opus 4.6 --- ui/src/index.css | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/src/index.css b/ui/src/index.css index c9ee652f..6a821296 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -377,21 +377,21 @@ } .paperclip-mdxeditor-content h1 { - margin: 0 0 0.9em; + margin: 1.4em 0 0.9em; font-size: 1.75em; font-weight: 700; line-height: 1.2; } .paperclip-mdxeditor-content h2 { - margin: 0 0 0.85em; + margin: 1.3em 0 0.85em; font-size: 1.35em; font-weight: 700; line-height: 1.3; } .paperclip-mdxeditor-content h3 { - margin: 0 0 0.8em; + margin: 1.2em 0 0.8em; font-size: 1.15em; font-weight: 600; line-height: 1.35; @@ -585,8 +585,11 @@ color: var(--muted-foreground); } -.paperclip-markdown :where(h1, h2, h3, h4) { - margin-top: 1.15rem; +.paperclip-markdown h1, +.paperclip-markdown h2, +.paperclip-markdown h3, +.paperclip-markdown h4 { + margin-top: 1.75rem; margin-bottom: 0.45rem; color: var(--foreground); font-weight: 600;