From 269f41525bd4e1c2ec613f1cb1249b057f10ac0e Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sun, 23 Feb 2025 15:02:55 +0800 Subject: [PATCH] style(mdx): Add subheading anchor style, underline on hover - Added `subheading-anchor` style to control subheading anchor display. - Removed default underline and added underline on hover for improved user experience. --- src/style/mdx.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/style/mdx.css b/src/style/mdx.css index 054d3bc..90f82f4 100644 --- a/src/style/mdx.css +++ b/src/style/mdx.css @@ -10,7 +10,7 @@ counter-reset: line; } -[data-rehype-pretty-code-figure] code[data-line-numbers]>[data-line]::before { +[data-rehype-pretty-code-figure] code[data-line-numbers] > [data-line]::before { counter-increment: line; content: counter(line); @apply mr-4 inline-block w-4 text-right text-gray-500; @@ -33,3 +33,7 @@ [data-rehype-pretty-code-figure] [data-chars-id] { @apply border-b-2 p-1 shadow-none; } + +.subheading-anchor { + @apply no-underline hover:underline; +}