mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 13:00:31 +00:00
* 弹窗动画 * 优化 PR 中的合并提交按钮颜色 * 优化按钮样式 * 同步 PR 的合并提交头像样式 * 同步 Issue/PR 的时间线样式 * Issue/PR 的时间线样式间隔和大小 * 同步 PR 的合并提交操作面板样式 * PR 操作间隔 * green * PR 操作边框色 * 已合并颜色 * 仓库同步派生栏样式同步 * 动画迁移 & 一些圆角修复 * 修复工单下依赖工单选择框 * 评论标题颜色&分支字体&提交栏样式 --------- Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
42 lines
953 B
TypeScript
42 lines
953 B
TypeScript
import { createGlobalThemeContract } from "@vanilla-extract/css";
|
|
import * as color from "./color";
|
|
|
|
export function varMapper(value: string | null, path: string[]) {
|
|
if (value === null) {
|
|
path = path.filter(item => item !== "self");
|
|
path = path.map(item => item.replace(/^num/, ""));
|
|
return path.join("-");
|
|
}
|
|
return value;
|
|
}
|
|
|
|
const vars = {
|
|
isDarkTheme: "is-dark-theme",
|
|
color: {
|
|
...color.other,
|
|
...color.message,
|
|
...color.named,
|
|
primary: color.primary,
|
|
secondary: color.secondary,
|
|
/** Actions 日志 ANSI 颜色 */
|
|
ansi: color.ansi,
|
|
console: color.console,
|
|
diff: color.diff,
|
|
},
|
|
github: color.github,
|
|
};
|
|
|
|
const otherVars = {
|
|
border: {
|
|
radius: null,
|
|
},
|
|
color: {
|
|
...color.otherAuto,
|
|
},
|
|
};
|
|
|
|
export const themeVars = createGlobalThemeContract(vars, varMapper);
|
|
export const otherThemeVars = createGlobalThemeContract(otherVars, varMapper);
|
|
|
|
export { css } from "@linaria/core";
|