fix: Restore the main button color of the pink theme and fix menu occlusion

This commit is contained in:
lutinglt committed 2026-10-01 22:24:39 +08:00
1 parent 3708dbd118
commit 990ce72536
5 files changed
+23 -42

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
### 🌈 Style
#### Adaptation for version 1.26
### 🎉 Adaptation for Gitea 1.26
#### More GitHub-like style
+8 -9
View File
@@ -1,12 +1,11 @@
### 🌈 Style
#### Adaptation for version 28.0.0
- The primary button color in the pink theme has been reverted from pink back to green.
- Fix the spacing issue of dropdown menu items.
- Optimize the width of secondary menu buttons.
- Fix the rounded corners of the user information panel avatar.
- Fix the top navigation bar avatar style not taking effect.
- Fix the issue of missing border lines when the menu pops up upwards.
- Synchronize repository star/RSS/Work button styles.
- Synchronize repository name style.
- Optimize the Actions Job queue list style.
> The initial idea was to emphasize pink more, but when primary buttons like the PR merge button don’t match the PR
> status border color, it looks especially jarring. I think this breaks the semantics of the button’s behavior, so I’ve
> reverted it to the GitHub style.
### 🐞 Fix
- Fix the issue of menu occlusion in the operation buttons on the differential page.
+12 -12
View File
@@ -306,10 +306,10 @@ exports[`display2GitHubColor > cover 后 contribution 颜色被改写 1`] = `
},
"primary": {
"bgColor": {
"active": "hsla(328, 62%, 62%, 1)",
"active": "#2e9a40",
"disabled": "#105823",
"hover": "hsla(328, 62%, 58%, 1)",
"rest": "#d34591",
"hover": "#29903b",
"rest": "#238636",
},
"borderColor": {
"active": "#ffffff26",
@@ -1768,7 +1768,7 @@ exports[`display2GitHubColor > cover 后 contribution 颜色被改写 1`] = `
"button": {
"primary": {
"fgColor": {
"accent": "#e57bb2",
"accent": "#3fb950",
},
},
},
@@ -2108,10 +2108,10 @@ exports[`display2GitHubColor > cover 后 contribution 颜色被改写 2`] = `
},
"primary": {
"bgColor": {
"active": "hsla(327, 65%, 44%, 1)",
"active": "#197935",
"disabled": "#95d8a6",
"hover": "hsla(327, 65%, 47%, 1)",
"rest": "#ce2c85",
"hover": "#1c8139",
"rest": "#1f883d",
},
"borderColor": {
"active": "#1f232826",
@@ -3570,7 +3570,7 @@ exports[`display2GitHubColor > cover 后 contribution 颜色被改写 2`] = `
"button": {
"primary": {
"fgColor": {
"accent": "#b12f79",
"accent": "#1a7f37",
},
},
},
@@ -3910,10 +3910,10 @@ exports[`display2GitHubColor > cover 后 contribution 颜色被改写 3`] = `
},
"primary": {
"bgColor": {
"active": "hsla(328, 52%, 59%, 1)",
"active": "#428f46",
"disabled": "#105823",
"hover": "hsla(328, 52%, 57%, 1)",
"rest": "hsla(328, 52%, 54%, 1)",
"hover": "#3b8640",
"rest": "#347d39",
},
"borderColor": {
"active": "#cdd9e526",
@@ -5372,7 +5372,7 @@ exports[`display2GitHubColor > cover 后 contribution 颜色被改写 3`] = `
"button": {
"primary": {
"fgColor": {
"accent": "#ec8dbd",
"accent": "#57ab5a",
},
},
},
-19
View File
@@ -41,24 +41,6 @@ export function display2GitHubColor(
},
borderColor: { accent: { emphasis: soft ? displayColor[6] : displayColor[5] } },
button: {
primary: {
fgColor: {
rest: baseGitHubColor.button.primary.fgColor.rest,
},
bgColor: {
rest: soft ? saturate(scaleColorLight(displayColor[5], -2), -0.1) : displayColor[5],
hover: soft
? saturate(scaleColorLight(displayColor[5], 4), -0.1)
: baseGitHubColor.isDarkTheme
? scaleColorLight(displayColor[5], 7)
: scaleColorLight(displayColor[5], -5),
active: soft
? saturate(scaleColorLight(displayColor[5], 9), -0.1)
: baseGitHubColor.isDarkTheme
? scaleColorLight(displayColor[5], 15)
: scaleColorLight(displayColor[5], -10),
},
},
star: {
iconColor: soft ? scaleColorLight(displayColor[6], -2) : saturate(scaleColorLight(displayColor[6], -2), 0.1),
},
@@ -80,6 +62,5 @@ export function display2GitHubColor(
borderColor: baseGitHubColor.contribution.default.borderColor,
},
},
themeExtra: { button: { primary: { fgColor: { accent: soft ? displayColor[7] : displayColor[6] } } } },
});
}
+2 -1
View File
@@ -94,8 +94,9 @@ const transition = css`
transform: translateY(0.5px);
}
/* 下拉图标的过渡会导致在下移过程中出现的菜单被短暂遮挡 */
/* 需要高于 .repository .diff-detail-box 的 z-index, 否则父级的优先级会导致子元素菜单的优先级被覆盖 */
&.dropdown {
z-index: 1;
z-index: 9;
}
.button:active {
transform: none;