From c6e73000bd0076b8d1647d57275eb9df74671c51 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 16 Aug 2025 13:03:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=93=E5=BA=93=E4=B8=AD?= =?UTF-8?q?=E6=96=87=20README=20=E6=97=B6=E7=9A=84=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=B8=8B=E5=88=92=E7=BA=BF=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/release.md | 1 + styles/components/filelist.ts | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/release.md b/.github/release.md index d92ca17..b551bc4 100644 --- a/.github/release.md +++ b/.github/release.md @@ -1,3 +1,4 @@ ## 🐞 Fix - 修复红绿色盲主题的代码高亮色 +- 修复仓库中文 README 时的按钮下划线长度 \ No newline at end of file diff --git a/styles/components/filelist.ts b/styles/components/filelist.ts index 48453d4..08500f4 100644 --- a/styles/components/filelist.ts +++ b/styles/components/filelist.ts @@ -96,6 +96,8 @@ export const repoFiles = css` } .file-header-left { padding: 6px 8px !important; + // 伪元素宽度等于按钮宽度而不是父元素宽度 + position: relative; &:hover { background: ${themeVars.github.control.transparent.bgColor.hover}; border-radius: ${otherThemeVars.border.radius}; @@ -104,11 +106,11 @@ export const repoFiles = css` content: ""; background: ${themeVars.github.underlineNav.borderColor.active}; border-radius: ${otherThemeVars.border.radius}; - bottom: 0; + bottom: -8px; + left: 0; height: 2px; position: absolute; - left: 12px; - width: 113px; + width: 100%; } a.muted:hover { color: inherit;