diff 页面同步 & Github 全局变量

This commit is contained in:
lutinglt
2025-06-28 23:19:37 +08:00
parent d2be94ee27
commit e113d1c603
10 changed files with 137 additions and 55 deletions

View File

@@ -1,42 +0,0 @@
// Made by Luting ^-^
.added-code,
.removed-code {
color: #fff !important;
border-radius: 0.1875rem;
* {
color: #fff !important;
border-radius: 0.1875rem;
}
}
.code-diff-unified {
.add-code {
.lines-num,
.lines-escape {
background-color: #1c4428;
}
}
.del-code {
.lines-num,
.lines-escape {
background-color: #542426;
}
}
}
.code-diff-unified .tag-code td,
.diff-file-body tr.tag-code:last-child > td {
background-color: #121d2f;
}
.code-expander-button,
.code-diff-unified .tag-code .lines-num,
.code-diff-unified .tag-code .lines-escape,
.diff-file-body tr.tag-code:last-child > td.lines-num,
.diff-file-body tr.tag-code:last-child > td.lines-escape {
background-color: #0c2d6b;
}
.code-expander-button:hover {
background: #1f6feb;
}

View File

@@ -0,0 +1,29 @@
import { css, themeVars } from "src";
export const diff = css`
/* 间隔行多余的颜色 */
.tag-code td {
background-color: unset;
}
/* 增加/删除行多余的颜色 */
.code-diff-unified {
.del-code,
.add-code {
background-color: unset;
border-color: unset;
}
}
/* 增加/删除相关代码背景色圆角 */
.added-code,
.removed-code {
border-radius: 0.1875rem;
}
/* 展开/收缩按钮悬停时颜色 */
.code-expander-button:hover {
background: ${themeVars.github.bgColor.accent.emphasis}
}
/* 行号居中 */
.lines-num {
text-align: center !important;
}
`;

View File

@@ -0,0 +1 @@
import "./diff"