fix: 修复暗色模式下 blame 页面背景高亮颜色错误
Release / release (push) Successful in 38s

This commit is contained in:
chuan
2026-05-22 00:22:05 +08:00
Unverified
parent 8dd9e1a71a
commit 4916518764
4 changed files with 29 additions and 4 deletions
+11 -1
View File
@@ -30,6 +30,8 @@ const requiredDarkSnippets = [
"--is-dark-theme: true", "--is-dark-theme: true",
"--color-body: #0d1117", "--color-body: #0d1117",
"--color-text: #e6edf3", "--color-text: #e6edf3",
"--color-diff-added-row-bg: #033a16",
"--color-diff-removed-row-bg: #490202",
"--github-bgColor-accent-emphasis: #1f6feb", "--github-bgColor-accent-emphasis: #1f6feb",
"--color-syntax-keyword: #ff7b72", "--color-syntax-keyword: #ff7b72",
"--color-syntax-string: #a5d6ff", "--color-syntax-string: #a5d6ff",
@@ -74,7 +76,15 @@ for (const file of [
} }
} }
for (const file of ["theme-meta.ts", "core.ts", "github-colors.ts", "syntax-colors.ts", "target-colors.ts", "index.ts"]) { for (const file of [
"theme-meta.ts",
"core.ts",
"diff-colors.ts",
"github-colors.ts",
"syntax-colors.ts",
"target-colors.ts",
"index.ts",
]) {
if (!darkThemeFiles.includes(file)) { if (!darkThemeFiles.includes(file)) {
throw new Error(`themes/github-dark is missing theme source file: ${file}`); throw new Error(`themes/github-dark is missing theme source file: ${file}`);
} }
+15
View File
@@ -0,0 +1,15 @@
export const diffColorTokens = `
--color-diff-added-fg: #3fb950;
--color-diff-added-linenum-bg: #0e4429;
--color-diff-added-row-bg: #033a16;
--color-diff-added-row-border: #196c2e;
--color-diff-added-word-bg: #196c2e;
--color-diff-removed-fg: #ff7b72;
--color-diff-removed-linenum-bg: #67060c;
--color-diff-removed-row-bg: #490202;
--color-diff-removed-row-border: #7d121c;
--color-diff-removed-word-bg: #7d121c;
--color-diff-moved-row-bg: #3d2f00;
--color-diff-moved-row-border: #9e6a03;
--color-diff-inactive: #161b22;
`.trim();
+1 -1
View File
@@ -1,9 +1,9 @@
import { ansiColorTokens } from "../github-light/ansi-colors"; import { ansiColorTokens } from "../github-light/ansi-colors";
import { diffColorTokens } from "../github-light/diff-colors";
import { namedColorTokens } from "../github-light/named-colors"; import { namedColorTokens } from "../github-light/named-colors";
import { semanticColorTokens } from "../github-light/semantic-colors"; import { semanticColorTokens } from "../github-light/semantic-colors";
import { consoleTokens } from "./console"; import { consoleTokens } from "./console";
import { coreTokens } from "./core"; import { coreTokens } from "./core";
import { diffColorTokens } from "./diff-colors";
import { githubColorTokens } from "./github-colors"; import { githubColorTokens } from "./github-colors";
import { syntaxColorTokens } from "./syntax-colors"; import { syntaxColorTokens } from "./syntax-colors";
import { targetColorTokens } from "./target-colors"; import { targetColorTokens } from "./target-colors";
+2 -2
View File
@@ -29,8 +29,8 @@ export const syntaxColorTokens = `
--color-syntax-punctuation: var(--color-text); --color-syntax-punctuation: var(--color-text);
--color-syntax-whitespace: #f85149; --color-syntax-whitespace: #f85149;
--color-syntax-diff-fg: var(--color-text); --color-syntax-diff-fg: var(--color-text);
--color-syntax-deleted-bg: #67060c; --color-syntax-deleted-bg: var(--color-diff-removed-row-bg);
--color-syntax-inserted-bg: #033a16; --color-syntax-inserted-bg: var(--color-diff-added-row-bg);
--color-syntax-emph: var(--color-text); --color-syntax-emph: var(--color-text);
--color-syntax-strong: var(--color-text); --color-syntax-strong: var(--color-text);
--color-syntax-heading: #1f6feb; --color-syntax-heading: #1f6feb;