From 73b668b20404d5a449c9f4fa5eeb8aeec5457683 Mon Sep 17 00:00:00 2001 From: Hadi Date: Mon, 4 May 2026 15:19:20 +0200 Subject: [PATCH] Change link-cards height Signed-off-by: Hadi --- src/pages/notes/[...slug].astro | 4 +++- src/styles/global.css | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pages/notes/[...slug].astro b/src/pages/notes/[...slug].astro index c201c68..dacf3b9 100644 --- a/src/pages/notes/[...slug].astro +++ b/src/pages/notes/[...slug].astro @@ -242,7 +242,9 @@ const headings = extractHeadings(entry.body ?? ""); const s = document.createElement("style"); s.id = "heading-anchor-styles"; s.textContent = ` - .note-content h2, .note-content h3, .note-content h4 { + .note-content h2:not(.link-card h2), + .note-content h3:not(.link-card h3), + .note-content h4:not(.link-card h4) { display: flex !important; align-items: center; flex-wrap: wrap; diff --git a/src/styles/global.css b/src/styles/global.css index e7d2c2a..d30ad8e 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -44,7 +44,7 @@ .link-card { display: flex; align-items: center; - padding: 0.5rem 0.875rem; + padding: 0 0.875rem; border-radius: var(--radius-box); border: 1px solid oklch(24% 0 0); background: transparent; @@ -79,8 +79,8 @@ .link-card h4 { font-size: 0.85rem; font-weight: 600; - margin: 0 0 0.1rem; - line-height: 1.2; + margin: 0; + line-height: 1; transition: color 0.15s ease; } .link-card:hover h4 { @@ -89,7 +89,7 @@ .link-card p { font-size: 0.75rem; margin: 0; - line-height: 1.2; + line-height: 1; color: oklch(52% 0 0); } }