From 986e0054c7133871535a57e4b49d098f0941a81e Mon Sep 17 00:00:00 2001 From: RiseForever Date: Fri, 11 Sep 2026 22:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E5=88=92=E7=BA=BF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 我真不想写 desc。 --- src/components/Search.astro | 2 +- src/styles/content.css | 30 ++++++++++++++++++------------ src/styles/shortcodes.css | 4 ++++ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/components/Search.astro b/src/components/Search.astro index ea36188..e67c2f8 100644 --- a/src/components/Search.astro +++ b/src/components/Search.astro @@ -65,7 +65,7 @@ const placeholder = siteConfig.search.provider === 'pagefind' ? siteConfig.searc .navbar-search-container > .search-form { transform-origin: right center; scale: 0 1; - transition: scale 200ms ease-out, opacity 200ms ease-out; + transition: scale 200ms cubic-bezier(0, 0.55, 0.45, 1), opacity 200ms cubic-bezier(0, 0.55, 0.45, 1); } .search-form input[type='search']::-webkit-search-cancel-button { diff --git a/src/styles/content.css b/src/styles/content.css index 0c71812..b79c099 100644 --- a/src/styles/content.css +++ b/src/styles/content.css @@ -49,20 +49,26 @@ font-size: 1.65rem; } -.prose :where(h2, h3) { - display: grid; - grid-template-columns: auto 1fr; - column-gap: 0.6em; - align-items: center; +.prose h2, +.prose h3 { + display: block !important; + width: fit-content; + max-width: 100%; + padding-bottom: 0.08em; + background: linear-gradient( + to bottom, + transparent calc(100% - 0.3em), + color-mix(in srgb, var(--color-accent) 32%, transparent) calc(100% - 0.3em) + ); + background-repeat: no-repeat; + overflow-wrap: anywhere; } -.prose :where(h2, h3)::before { - width: 4px; - height: 1.05em; - border-radius: 2px; - background: var(--color-accent); - transform: translateY(0.08em); - content: ''; +/* Remove the legacy heading marker even when an old stylesheet survives a PJAX swap. */ +.prose h2::before, +.prose h3::before { + display: none !important; + content: none !important; } .prose :where(p, ul, ol, blockquote, pre, table) { diff --git a/src/styles/shortcodes.css b/src/styles/shortcodes.css index 9d81ac4..e0cede9 100644 --- a/src/styles/shortcodes.css +++ b/src/styles/shortcodes.css @@ -276,6 +276,10 @@ } .prose .shortcode-tools-title { display: block; + width: auto; + max-width: none; + padding-bottom: 0; + background: none; } .prose .shortcode-tools-title::before { content: none;