From 24f541180ff33dd93e438190d7fd8bcc7a2f57bf Mon Sep 17 00:00:00 2001 From: lutinglt Date: Fri, 28 Nov 2025 16:11:37 +0800 Subject: [PATCH] Optimize menu item & code block styles --- CHANGELOG.md | 3 +++ styles/public/base.ts | 4 ++++ styles/public/menu.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50eb1a7..db276ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ #### More aligned with GitHub style +- Optimize the selection style of items in the menu +- Optimize code block styles + ##### Template File - Synchronized repository code list page layout and styles diff --git a/styles/public/base.ts b/styles/public/base.ts index 85cb729..0a61d74 100644 --- a/styles/public/base.ts +++ b/styles/public/base.ts @@ -7,4 +7,8 @@ export const body = css` a { text-underline-offset: 0.2rem; // 0.2rem 可以始终保持下划线不受 overflow: hidden 的影响 } + // 默认代码块 + code:not(.code-inner) { + padding: 0.2em 0.4em; + } `; diff --git a/styles/public/menu.ts b/styles/public/menu.ts index 173f51b..317da16 100644 --- a/styles/public/menu.ts +++ b/styles/public/menu.ts @@ -5,7 +5,7 @@ export const activeItemAfterStyle = { backgroundColor: themeVars.github.borderColor.accent.emphasis, borderRadius: otherThemeVars.border.radius, height: "24px", - left: "calc(0.5rem * -1)", + left: "-8px", position: "absolute", top: "calc(50% - 12px)", width: "4px",