diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index df0f548..a25811e 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -8,7 +8,7 @@ ### 🌈 Style -#### Adaptation for version 1.26 +### 🎉 Adaptation for Gitea 1.26 #### More GitHub-like style diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fd0e8b..0c14713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/palette/__snapshots__/display.test.ts.snap b/src/palette/__snapshots__/display.test.ts.snap index bd9c69e..cc1e98a 100644 --- a/src/palette/__snapshots__/display.test.ts.snap +++ b/src/palette/__snapshots__/display.test.ts.snap @@ -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", }, }, }, diff --git a/src/palette/display.ts b/src/palette/display.ts index a8d17b8..e9dacf3 100644 --- a/src/palette/display.ts +++ b/src/palette/display.ts @@ -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] } } } }, }); } diff --git a/styles/public/transition.ts b/styles/public/transition.ts index 0965ab4..4daaacd 100644 --- a/styles/public/transition.ts +++ b/styles/public/transition.ts @@ -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;