import { css, themeVars } from "src/types/vars"; // 仓库头信息 export const repoHeader = css` .page-content.repository .repo-header { // 点星/关注/克隆/RSS 按钮 .ui.compact.button { padding: 6px 16px; // 增加内边距 border-radius: 8px; // 增加圆角 font-weight: 500; // 增加字体粗细 transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 &:hover { // 移除 transform 以避免创建新的层叠上下文 // transform: translateY(-1px); // 轻微上移效果 } &:active { animation: pulse-click 200ms cubic-bezier(0.4, 0, 0.2, 1); // 点击脉冲效果 } } // 仓库名称 .flex-item { .flex-item-title { // 间隔线颜色 color: ${themeVars.color.text.light.num1}; // 仓库名称 a { display: flex; align-items: center; color: ${themeVars.color.text.self}; font-size: 20px; // 增加字体大小 font-weight: 600; // 增加字体粗细 text-decoration: none !important; min-width: 3ch; padding: 8px 12px; // 增加内边距 border-radius: 8px; // 增加圆角 margin-top: 0.5rem; margin-bottom: 0.5rem; transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 &:hover { background: ${themeVars.github.control.transparent.bgColor.hover}; position: relative; left: 2px; } &.muted:not(.tw-font-normal) { font-weight: 600; } } } // 默认的 hover 为 primary 颜色, 修正 a:not(.label, .button):hover { color: ${themeVars.color.text.self} !important; } } } `; // 顶部提交, 标签, 分支统计 export const repoMenu = css` .page-content.repository { .repository-summary .repository-menu { background-color: ${themeVars.color.box.header}; border-radius: 12px; // 增加圆角 padding: 8px; // 增加内边距 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); // 添加阴影 .item { color: ${themeVars.color.text.light.num1}; height: 36px; // 增加高度 padding: 0 16px; // 增加内边距 border-radius: 8px; // 增加圆角 font-weight: 500; // 增加字体粗细 transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 b { color: ${themeVars.color.text.self}; margin: 0 4px; // 增加边距 } &.active { background-color: ${themeVars.color.active}; color: ${themeVars.color.text.self}; font-weight: 600; // 增加字体粗细 svg { color: ${themeVars.color.text.light.num1}; } &:hover { position: relative; top: -1px; } } &:hover:not(.active) { background-color: ${themeVars.github.control.transparent.bgColor.hover}; position: relative; top: -1px; } } } } `; export const repoTopic = css` // 理应只能覆盖探索/组织/用户下仓库的 topic 标签 // 避免渲染到仓库的类型标签 .flex-item-main > .label-list .ui.label, // 仓库文件列表下的 topic 标签 #repo-topics .ui.label.repo-topic { border-radius: 25px; font-size: 12px; font-weight: 500; padding: 6px 12px; // 增加内边距 background-color: ${themeVars.github.bgColor.accent.muted}; color: ${themeVars.github.fgColor.accent}; transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 &:hover { background-color: ${themeVars.github.bgColor.accent.emphasis}; color: ${themeVars.color.white}; position: relative; top: -1px; } } `; // 仓库动态页面关闭工单状态条颜色 export const closedIssueTableCell = css` .stats-table .table-cell.tw-bg-red[href="#closed-issues"] { background-color: ${themeVars.color.purple.self} !important; border-radius: 8px; // 增加圆角 transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果 &:hover { opacity: 0.9; // 悬停时降低不透明度 position: relative; top: -1px; } } `;