同步主色调按钮和红色按钮的阴影样式

This commit is contained in:
lutinglt
2025-09-09 14:14:12 +08:00
parent 1a702c9526
commit 8e8416507e
8 changed files with 33 additions and 11 deletions

1
.github/release.md vendored
View File

@@ -45,6 +45,7 @@ determined.
- 微调仓库相关界面元素间隔
- 同步软件包页面样式
- 同步提示框样式
- 同步主色调按钮和红色按钮的阴影样式
### 🐞 Fix

View File

@@ -68,7 +68,7 @@ export type GithubColor = {
bgColor: { active: string; hover: string; rest: string };
transparent: { bgColor: { active: string; hover: string; selected: string } };
};
shadow: { floating: { small: string } };
shadow: { floating: { small: string }; resting: { small: string } };
overlay: { backdrop: { bgColor: string } };
underlineNav: { borderColor: { active: string } };
contribution: {
@@ -302,6 +302,9 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor {
floating: {
small: `0px 0px 0px 1px ${themeVars.color.light.border}, 0px 6px 12px -3px ${themeVars.color.shadow.self}, 0px 6px 18px 0px ${themeVars.color.shadow.self};`,
},
resting: {
small: `0px 1px 1px 0px ${githubColor.shadow.resting.small}, 0px 1px 3px 0px ${githubColor.shadow.resting.small};`,
},
},
underlineNav: {
borderColor: {

View File

@@ -203,6 +203,14 @@ export const github = {
*/
small: null,
},
resting: {
/** 静止阴影
* @button `primaryStyle` 主色调按钮阴影
* @button `redButton` 红色按钮悬浮阴影
* @setting `button` 红色按钮阴影
*/
small: null,
}
},
underlineNav: {
borderColor: {

View File

@@ -25,7 +25,7 @@ export const button = css`
color: ${themeVars.color.text.light.self};
background-color: ${themeVars.color.button};
border-color: ${themeVars.color.light.border};
box-shadow: none;
&:hover {
background-color: ${themeVars.color.hover.self};
}
@@ -57,12 +57,19 @@ export const button = css`
}
}
// 管理员设置界面下的自定义主色调按钮
.admin-setting-content .ui.primary.button {
${tinyStyle}
padding: 5px 16px;
line-height: 22px;
&:hover {
${tinyHoverStyle}
.admin-setting-content {
.ui.primary.button {
${tinyStyle}
padding: 5px 16px;
line-height: 22px;
&:hover {
${tinyHoverStyle}
}
}
.ui.red.button {
box-shadow: ${themeVars.github.shadow.resting.small};
padding: 5px 16px;
line-height: 22px;
}
}
`;

View File

@@ -4,6 +4,7 @@ export const primaryStyle = {
color: themeVars.github.button.primary.fgColor.rest,
backgroundColor: themeVars.github.button.primary.bgColor.rest,
borderColor: themeVars.github.button.primary.borderColor.rest,
boxShadow: themeVars.github.shadow.resting.small,
};
export const primaryHoverStyle = {
@@ -45,6 +46,7 @@ export const baseButton = css`
background-color: ${themeVars.color.button};
color: ${themeVars.color.text.self};
border-color: ${themeVars.color.light.border};
box-shadow: none;
&:hover {
background-color: ${themeVars.color.hover.self};
color: ${themeVars.color.text.self};
@@ -85,6 +87,7 @@ export const redButton = css`
color: ${themeVars.github.button.danger.fgColor.hover};
background-color: ${themeVars.github.button.danger.bgColor.hover};
border-color: ${themeVars.github.button.danger.borderColor.hover};
box-shadow: ${themeVars.github.shadow.resting.small};
}
}
`;

View File

@@ -64,7 +64,7 @@ export const darkGithubColors: GithubColor = {
bgColor: { active: "#2a313c", hover: "#262c36", rest: "#212830" },
transparent: { bgColor: { active: "#656c7640", hover: "#656c7633", selected: "#656c761a" } },
},
shadow: { floating: { small: "#01040966" } },
shadow: { floating: { small: "#01040966" }, resting: { small: "#01040999" } },
overlay: { backdrop: { bgColor: "#21283066" } },
underlineNav: { borderColor: { active: "#f78166" } },
contribution: {

View File

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

View File

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