优化下拉菜单的样式&同步亮色和柔和暗色主题下的菜单颜色

This commit is contained in:
lutinglt
2025-09-28 21:37:15 +08:00
parent c5724f41c5
commit 05a4dc4f8a
9 changed files with 42 additions and 8 deletions

View File

@@ -6,7 +6,9 @@
- 修复并同步工单或 PR 详细页面下的标签菜单样式 #19 - 修复并同步工单或 PR 详细页面下的标签菜单样式 #19
- 同步页脚样式 - 同步页脚样式
- 优化下拉菜单的样式
- 优化创建标签菜单的菜单项的样式 - 优化创建标签菜单的菜单项的样式
- 同步亮色和柔和暗色主题下的菜单颜色
### 🐞 Fix ### 🐞 Fix

View File

@@ -70,7 +70,7 @@ export type GithubColor = {
transparent: { bgColor: { active: string; hover: string; selected: string } }; transparent: { bgColor: { active: string; hover: string; selected: string } };
}; };
shadow: { floating: { small: string }; resting: { small: string } }; shadow: { floating: { small: string }; resting: { small: string } };
overlay: { backdrop: { bgColor: string } }; overlay: { backdrop: { bgColor: string }; bgColor: string };
underlineNav: { borderColor: { active: string } }; underlineNav: { borderColor: { active: string } };
contribution: { contribution: {
default: { default: {
@@ -91,7 +91,7 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor {
activeBg: githubColor.control.bgColor.active, activeBg: githubColor.control.bgColor.active,
hoverBg: githubColor.control.transparent.bgColor.hover, hoverBg: githubColor.control.transparent.bgColor.hover,
menu: { menu: {
bg: githubColor.bgColor.inset, bg: githubColor.overlay.bgColor,
border: githubColor.borderColor.muted, border: githubColor.borderColor.muted,
}, },
}; };
@@ -169,7 +169,7 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor {
opaque: themeVars.color.box.header, opaque: themeVars.color.box.header,
}, },
active: githubColor.control.transparent.bgColor.selected, active: githubColor.control.transparent.bgColor.selected,
menu: githubColor.bgColor.inset, menu: githubColor.overlay.bgColor,
card: themeVars.color.body, card: themeVars.color.body,
markup: { markup: {
tableRow: githubColor.bgColor.muted, tableRow: githubColor.bgColor.muted,

View File

@@ -92,7 +92,7 @@ export const clone = css`
.item { .item {
border-radius: ${otherThemeVars.border.radius}; border-radius: ${otherThemeVars.border.radius};
padding: 6px 8px; padding: 6px 8px;
line-height: 1.5; min-height: 32px;
margin: 0; margin: 0;
svg { svg {
color: ${themeVars.color.text.light.num1}; color: ${themeVars.color.text.light.num1};

View File

@@ -655,7 +655,8 @@ export const issueSidebar = css`
.ui.form .due-date { .ui.form .due-date {
color: ${themeVars.color.text.self}; color: ${themeVars.color.text.self};
} }
.divider { // 分割线
> .divider {
margin: 12px 0 12px 8px; margin: 12px 0 12px 8px;
width: calc(100% - 16px); width: calc(100% - 16px);
} }

View File

@@ -19,6 +19,7 @@ export const dropdown = css`
align-items: center; align-items: center;
align-content: center; align-content: center;
padding: 6px 8px !important; padding: 6px 8px !important;
min-height: 32px;
border-radius: ${otherThemeVars.border.radius} !important; border-radius: ${otherThemeVars.border.radius} !important;
gap: 4px; gap: 4px;
&:not(.emoji) { &:not(.emoji) {
@@ -255,6 +256,32 @@ export const branchDropdown = css`
max-width: 640px; max-width: 640px;
> .menu > .item { > .menu > .item {
animation: ${animationDown}; animation: ${animationDown};
height: 32px;
}
// 分支/标签切换
> .branch-tag-tab {
> .branch-tag-item {
font-weight: 500;
padding: 8px 12px;
height: 32px;
line-height: 1.15;
svg {
display: none;
}
&.active {
background: ${themeVars.color.body};
}
&:hover {
color: inherit;
&:not(.active) {
background: ${themeVars.color.hover.self};
border: 1px solid ${themeVars.color.secondary.self};
border-bottom: 0;
border-top-left-radius: ${otherThemeVars.border.radius};
border-top-right-radius: ${otherThemeVars.border.radius};
}
}
}
} }
} }
`; `;

View File

@@ -39,4 +39,8 @@ export const input = css`
.ui.form#repo-search-form { .ui.form#repo-search-form {
align-items: center; align-items: center;
} }
// 下拉菜单的输入框
.ui.dropdown.dropdown .menu>.input {
margin: 12px 10px;
}
`; `;

View File

@@ -73,7 +73,7 @@ export const darkGithubColors: GithubColor = {
transparent: { bgColor: { active: "#656c7640", hover: "#656c7633", selected: "#656c761a" } }, transparent: { bgColor: { active: "#656c7640", hover: "#656c7633", selected: "#656c761a" } },
}, },
shadow: { floating: { small: "#01040966" }, resting: { small: "#01040999" } }, shadow: { floating: { small: "#01040966" }, resting: { small: "#01040999" } },
overlay: { backdrop: { bgColor: "#21283066" } }, overlay: { backdrop: { bgColor: "#21283066" }, bgColor: "#010409" },
underlineNav: { borderColor: { active: "#f78166" } }, underlineNav: { borderColor: { active: "#f78166" } },
contribution: { contribution: {
default: { default: {

View File

@@ -73,7 +73,7 @@ export const lightGithubColors: GithubColor = {
transparent: { bgColor: { active: "#818b9826", hover: "#818b981a", selected: "#818b9826" } }, transparent: { bgColor: { active: "#818b9826", hover: "#818b981a", selected: "#818b9826" } },
}, },
shadow: { floating: { small: "#25292e0a" }, resting: { small: "#1f23280f" } }, shadow: { floating: { small: "#25292e0a" }, resting: { small: "#1f23280f" } },
overlay: { backdrop: { bgColor: "#c8d1da66" } }, overlay: { backdrop: { bgColor: "#c8d1da66" }, bgColor: "#ffffff" },
underlineNav: { borderColor: { active: "#fd8c73" } }, underlineNav: { borderColor: { active: "#fd8c73" } },
contribution: { contribution: {
default: { default: {

View File

@@ -67,7 +67,7 @@ export const softDarkGithubColors: GithubColor = {
transparent: { bgColor: { active: "#656c7633", hover: "#656c7626", selected: "#656c761a" } }, transparent: { bgColor: { active: "#656c7633", hover: "#656c7626", selected: "#656c761a" } },
}, },
shadow: { floating: { small: "#01040966" }, resting: { small: "#01040999" } }, shadow: { floating: { small: "#01040966" }, resting: { small: "#01040999" } },
overlay: { backdrop: { bgColor: "#262c3666" } }, overlay: { backdrop: { bgColor: "#262c3666" }, bgColor: "#2a313c" },
underlineNav: { borderColor: { active: "#ec775c" } }, underlineNav: { borderColor: { active: "#ec775c" } },
contribution: { contribution: {
default: { default: {