From e537b75bad0cc8cefde2ca38e383b4c951ed82f8 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 1 Nov 2025 13:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Issue/PR=20=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E9=A1=B5=E9=9D=A2=E4=B8=AD=E6=97=B6=E9=97=B4=E7=BA=BF?= =?UTF-8?q?=E4=B8=8A=E7=9A=84=E6=A0=87=E7=AD=BE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +- styles/public/label.ts | 125 +++++++++++++++++++++-------------------- 2 files changed, 67 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7058ca..6629274 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,11 @@ - 修复 Issue/PR 侧边栏的时间追踪样式 - 修复 Issue/PR 详细页面中的部分文字颜色 +- 修复 Issue/PR 详细页面中时间线上的标签样式 - 修复一些选择输入框的排列问题 ## 📃 English ### 🌈 Style -##### More aligned with GitHub style \ No newline at end of file +##### More aligned with GitHub style diff --git a/styles/public/label.ts b/styles/public/label.ts index d314e95..12aeb77 100644 --- a/styles/public/label.ts +++ b/styles/public/label.ts @@ -3,68 +3,73 @@ import { css, themeVars } from "src/types/vars"; export const label = css` /* 所有标签, 但不包括 a 标签 */ /* a 标签比如仓库点星等按钮旁边的数字标签按钮,提交图中的 tag 标签 */ + div.label, + span.label, + // 包含多个标签的元素, 比如 Issue/PR 详情页中的时间线上的标签 + span.labels-list a.label { + &.ui.ui.ui { + border-radius: 9999px; + padding: 1.5px 6px; + // 多个标签的组合标签的圆角修复 + &.scope-parent { + .scope-left { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .scope-middle { + border-radius: 0; + } + .scope-right { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + } + } + } div, span { - &.ui.ui.ui { - &.label { - border-radius: 9999px; - padding: 1.5px 6px; - // 多个标签的组合标签的圆角修复 - &.scope-parent { - .scope-left { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - .scope-middle { - border-radius: 0; - } - .scope-right { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - } - /* 主色调标签 */ - &.primary { - background-color: unset; - border: 1px solid ${themeVars.color.primary.self}; - color: ${themeVars.color.primary.self}; - } - /* 红色标签 */ - &.red { - background-color: unset; - border: 1px solid ${themeVars.github.borderColor.done.emphasis}; - color: ${themeVars.color.purple.self}; - } - /* 橙色标签 */ - &.orange { - background-color: unset; - border: 1px solid ${themeVars.github.borderColor.attention.emphasis}; - color: ${themeVars.color.yellow.self}; - } - /* 黄色标签 */ - &.yellow { - background-color: unset; - border: 1px solid ${themeVars.github.borderColor.attention.emphasis}; - color: ${themeVars.color.orange.self}; - } - /* 黄绿色标签 */ - &.olive { - background-color: unset; - border: 1px solid ${themeVars.color.olive.self}; - color: ${themeVars.color.olive.self}; - } - /* 绿色标签 */ - &.green { - background-color: unset; - border: 1px solid ${themeVars.github.borderColor.success.emphasis}; - color: ${themeVars.color.green.self}; - } - /* 紫色标签 */ - &.purple { - background-color: unset; - border: 1px solid ${themeVars.github.borderColor.done.emphasis}; - color: ${themeVars.color.purple.self}; - } + &.ui.ui.ui.label { + /* 主色调标签 */ + &.primary { + background-color: unset; + border: 1px solid ${themeVars.color.primary.self}; + color: ${themeVars.color.primary.self}; + } + /* 红色标签 */ + &.red { + background-color: unset; + border: 1px solid ${themeVars.github.borderColor.done.emphasis}; + color: ${themeVars.color.purple.self}; + } + /* 橙色标签 */ + &.orange { + background-color: unset; + border: 1px solid ${themeVars.github.borderColor.attention.emphasis}; + color: ${themeVars.color.yellow.self}; + } + /* 黄色标签 */ + &.yellow { + background-color: unset; + border: 1px solid ${themeVars.github.borderColor.attention.emphasis}; + color: ${themeVars.color.orange.self}; + } + /* 黄绿色标签 */ + &.olive { + background-color: unset; + border: 1px solid ${themeVars.color.olive.self}; + color: ${themeVars.color.olive.self}; + } + /* 绿色标签 */ + &.green { + background-color: unset; + border: 1px solid ${themeVars.github.borderColor.success.emphasis}; + color: ${themeVars.color.green.self}; + } + /* 紫色标签 */ + &.purple { + background-color: unset; + border: 1px solid ${themeVars.github.borderColor.done.emphasis}; + color: ${themeVars.color.purple.self}; } } }