mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 22:01:59 +00:00
Compare commits
4 Commits
0ace99a642
...
f74211749d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f74211749d | ||
|
|
1c6b7540f3 | ||
|
|
186f58815b | ||
|
|
9b07108c44 |
2
.github/release.md
vendored
2
.github/release.md
vendored
@@ -17,6 +17,8 @@
|
|||||||
- 主色调按钮边框色同步
|
- 主色调按钮边框色同步
|
||||||
- 设置界面右上角小按钮样式同步
|
- 设置界面右上角小按钮样式同步
|
||||||
- 弹窗背景色和叠加背景色同步
|
- 弹窗背景色和叠加背景色同步
|
||||||
|
- 全局圆角样式同步
|
||||||
|
- 工单标签颜色同步
|
||||||
|
|
||||||
## 🎈 Perf
|
## 🎈 Perf
|
||||||
|
|
||||||
|
|||||||
@@ -45,11 +45,15 @@ export type GithubColor = {
|
|||||||
muted: string;
|
muted: string;
|
||||||
};
|
};
|
||||||
success: {
|
success: {
|
||||||
|
emphasis: string;
|
||||||
muted: string;
|
muted: string;
|
||||||
};
|
};
|
||||||
danger: {
|
danger: {
|
||||||
muted: string;
|
muted: string;
|
||||||
};
|
};
|
||||||
|
done: {
|
||||||
|
emphasis: string;
|
||||||
|
};
|
||||||
default: string;
|
default: string;
|
||||||
inset: string;
|
inset: string;
|
||||||
muted: string;
|
muted: string;
|
||||||
@@ -262,6 +266,12 @@ export function defineGithubTheme(githubColor: GithubColor): Theme {
|
|||||||
accent: {
|
accent: {
|
||||||
emphasis: githubColor.bgColor.accent.emphasis,
|
emphasis: githubColor.bgColor.accent.emphasis,
|
||||||
},
|
},
|
||||||
|
success: {
|
||||||
|
emphasis: githubColor.bgColor.success.emphasis,
|
||||||
|
},
|
||||||
|
done: {
|
||||||
|
emphasis: githubColor.bgColor.done.emphasis,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
borderColor: {
|
borderColor: {
|
||||||
accent: {
|
accent: {
|
||||||
|
|||||||
@@ -32,6 +32,18 @@ export const github = {
|
|||||||
*/
|
*/
|
||||||
emphasis: null,
|
emphasis: null,
|
||||||
},
|
},
|
||||||
|
success: {
|
||||||
|
/** 成功的背景颜色
|
||||||
|
* @issue `babel` 重新开启图标背景颜色
|
||||||
|
*/
|
||||||
|
emphasis: null,
|
||||||
|
},
|
||||||
|
done: {
|
||||||
|
/** 完成的背景颜色
|
||||||
|
* @issue `babel` 工单已关闭图标背景颜色
|
||||||
|
*/
|
||||||
|
emphasis: null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
borderColor: {
|
borderColor: {
|
||||||
accent: {
|
accent: {
|
||||||
|
|||||||
@@ -23,3 +23,44 @@ export const button = css`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const babel = css`
|
||||||
|
.issue-content-left {
|
||||||
|
.badge {
|
||||||
|
// 时间线打开状态标签
|
||||||
|
&.tw-bg-green {
|
||||||
|
background-color: ${themeVars.github.bgColor.success.emphasis} !important;
|
||||||
|
border-color: ${themeVars.github.bgColor.success.emphasis} !important;
|
||||||
|
}
|
||||||
|
// 时间线关闭状态标签
|
||||||
|
&.tw-bg-red {
|
||||||
|
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
}
|
||||||
|
// 时间线合并状态标签
|
||||||
|
&.tw-bg-purple {
|
||||||
|
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 工单&PR状态标签
|
||||||
|
.ui.label.issue-state-label {
|
||||||
|
border-radius: 25px !important;
|
||||||
|
|
||||||
|
&.green {
|
||||||
|
background-color: ${themeVars.github.bgColor.success.emphasis} !important;
|
||||||
|
border-color: ${themeVars.github.bgColor.success.emphasis} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.red {
|
||||||
|
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.purple {
|
||||||
|
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
// Made by Rainnny <3
|
|
||||||
.CodeMirror.cm-s-default,
|
|
||||||
.CodeMirror.cm-s-paper {
|
|
||||||
.cm-property {
|
|
||||||
color: #a0cc75;
|
|
||||||
}
|
|
||||||
.cm-header {
|
|
||||||
color: #9daccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-quote {
|
|
||||||
color: #090;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-keyword {
|
|
||||||
color: #cc8a61;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-atom {
|
|
||||||
color: #ef5e77;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-number {
|
|
||||||
color: #ff5656;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-def {
|
|
||||||
color: #e4e4e4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-variable-2 {
|
|
||||||
color: #00bdbf;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-variable-3 {
|
|
||||||
color: #085;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-comment {
|
|
||||||
color: #8e9ab3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-string {
|
|
||||||
color: #a77272;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-string-2 {
|
|
||||||
color: #f50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-meta,
|
|
||||||
.cm-qualifier {
|
|
||||||
color: #ffb176;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-builtin {
|
|
||||||
color: #b7c951;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-bracket {
|
|
||||||
color: #997;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-tag {
|
|
||||||
color: #f1d273;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-attribute {
|
|
||||||
color: #bfcc70;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-hr {
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-url {
|
|
||||||
color: #c5cfd0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cm-link {
|
|
||||||
color: #d8c792;
|
|
||||||
}
|
|
||||||
.cm-error {
|
|
||||||
color: #dbdbeb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
89
styles/public/codemirror.tsx
Normal file
89
styles/public/codemirror.tsx
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
import { css } from "src/types/vars";
|
||||||
|
|
||||||
|
export const codemirror = css`
|
||||||
|
.CodeMirror.cm-s-default,
|
||||||
|
.CodeMirror.cm-s-paper {
|
||||||
|
.cm-property {
|
||||||
|
color: #a0cc75;
|
||||||
|
}
|
||||||
|
.cm-header {
|
||||||
|
color: #9daccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-quote {
|
||||||
|
color: #090;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-keyword {
|
||||||
|
color: #cc8a61;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-atom {
|
||||||
|
color: #ef5e77;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-number {
|
||||||
|
color: #ff5656;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-def {
|
||||||
|
color: #e4e4e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-variable-2 {
|
||||||
|
color: #00bdbf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-variable-3 {
|
||||||
|
color: #085;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-comment {
|
||||||
|
color: #8e9ab3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-string {
|
||||||
|
color: #a77272;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-string-2 {
|
||||||
|
color: #f50;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-meta,
|
||||||
|
.cm-qualifier {
|
||||||
|
color: #ffb176;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-builtin {
|
||||||
|
color: #b7c951;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-bracket {
|
||||||
|
color: #997;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-tag {
|
||||||
|
color: #f1d273;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-attribute {
|
||||||
|
color: #bfcc70;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-hr {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-url {
|
||||||
|
color: #c5cfd0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cm-link {
|
||||||
|
color: #d8c792;
|
||||||
|
}
|
||||||
|
.cm-error {
|
||||||
|
color: #dbdbeb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
import "./button"; // 按钮
|
import "./button"; // 按钮
|
||||||
import "./chroma"; // 代码高亮
|
import "./chroma"; // 代码高亮
|
||||||
|
import "./codemirror"; // codemirror 样式
|
||||||
import "./input"; // 输入框
|
import "./input"; // 输入框
|
||||||
|
import "./label"; // 标签
|
||||||
import "./modal"; // 弹窗
|
import "./modal"; // 弹窗
|
||||||
|
import "./radius"; // 圆角
|
||||||
import "./svg"; // svg 图标
|
import "./svg"; // svg 图标
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
// Made by Luting ^-^
|
// Made by Luting ^-^
|
||||||
.repo-buttons .ui.basic.label {
|
|
||||||
color: #f0f6fc;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.ui.basic.label:hover {
|
|
||||||
color: #f0f6fc;
|
|
||||||
background-color: #262c36;
|
|
||||||
border-color: var(--color-light-border);
|
|
||||||
}
|
|
||||||
|
|
||||||
span,
|
span,
|
||||||
.org-visibility div {
|
.org-visibility div {
|
||||||
@@ -17,30 +8,7 @@ span,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge.tw-bg-green,
|
|
||||||
.ui.green.label.issue-state-label {
|
|
||||||
background-color: #238636 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge.tw-bg-red {
|
|
||||||
background-color: var(--color-purple) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.ui.ui {
|
.ui.ui.ui {
|
||||||
&.purple.label {
|
|
||||||
border-radius: 25px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.green.label.issue-state-label {
|
|
||||||
background: var(--color-primary);
|
|
||||||
border-radius: 25px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.red.label.issue-state-label {
|
|
||||||
background: var(--color-purple);
|
|
||||||
border-radius: 25px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.primary.label {
|
&.primary.label {
|
||||||
color: var(--color-blue);
|
color: var(--color-blue);
|
||||||
background-color: #388bfd33;
|
background-color: #388bfd33;
|
||||||
@@ -86,10 +54,6 @@ a.ui.ui.ui {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.issue-list .text.red {
|
|
||||||
color: #ab7df8 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Runner&软件包&提交 标签
|
// Runner&软件包&提交 标签
|
||||||
.ui.label {
|
.ui.label {
|
||||||
&.sha {
|
&.sha {
|
||||||
|
|||||||
0
styles/public/label.tsx
Normal file
0
styles/public/label.tsx
Normal file
@@ -1,98 +0,0 @@
|
|||||||
.ui {
|
|
||||||
&.button,
|
|
||||||
&.basic.buttons .button,
|
|
||||||
&.basic.button,
|
|
||||||
&.dropdown .menu,
|
|
||||||
&.form input:not([type]),
|
|
||||||
&.form input[type="date"],
|
|
||||||
&.form input[type="datetime-local"],
|
|
||||||
&.form input[type="email"],
|
|
||||||
&.form input[type="number"],
|
|
||||||
&.form input[type="password"],
|
|
||||||
&.form input[type="search"],
|
|
||||||
&.form input[type="tel"],
|
|
||||||
&.form input[type="time"],
|
|
||||||
&.form input[type="text"],
|
|
||||||
&.form input[type="file"],
|
|
||||||
&.form input[type="url"],
|
|
||||||
&.form textarea,
|
|
||||||
&.input textarea,
|
|
||||||
&.ui.input > input,
|
|
||||||
&.label,
|
|
||||||
&.menu,
|
|
||||||
&.segment,
|
|
||||||
&.segments,
|
|
||||||
&.segments:not(.horizontal) > .segment:only-child,
|
|
||||||
&.secondary.menu .dropdown.item > .menu,
|
|
||||||
&.selection.dropdown,
|
|
||||||
&.selection.dropdown .menu,
|
|
||||||
&.table,
|
|
||||||
&.text.menu .dropdown.item > .menu {
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
.floating.dropdown > .menu {
|
|
||||||
border-radius: var(--border-radius) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repository.view.issue .comment-list .comment > .content > div:last-child {
|
|
||||||
border-bottom-right-radius: var(--border-radius);
|
|
||||||
border-bottom-left-radius: var(--border-radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 左边框圆角 */
|
|
||||||
.ui {
|
|
||||||
&.action.input > .dropdown:first-child,
|
|
||||||
&.action.input > .button:first-child,
|
|
||||||
&.action.input > .buttons:first-child > .button,
|
|
||||||
&.compact.menu:not(.secondary) .item:first-child,
|
|
||||||
&.horizontal.segments > .segment:first-child {
|
|
||||||
border-radius: var(--border-radius) 0 0 var(--border-radius);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 右边框圆角 */
|
|
||||||
.ui {
|
|
||||||
&.action.input > .dropdown:last-child,
|
|
||||||
&.action.input > .button:last-child,
|
|
||||||
&.action.input > .buttons:last-child > .button,
|
|
||||||
&.compact.menu:not(.secondary) .item:last-child,
|
|
||||||
&.horizontal.segments > .segment:last-child {
|
|
||||||
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 上边框圆角 */
|
|
||||||
.ui.secondary.pointing.menu {
|
|
||||||
.active.item,
|
|
||||||
.item:hover {
|
|
||||||
border-radius: var(--border-radius) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.tabular.menu .active.item,
|
|
||||||
.repository.view.issue .comment-list .comment > .content > div:first-child {
|
|
||||||
border-top-left-radius: var(--border-radius) !important;
|
|
||||||
border-top-right-radius: var(--border-radius) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮边框圆角 */
|
|
||||||
.ui.active.selection.dropdown {
|
|
||||||
border-bottom-left-radius: var(--border-radius) !important;
|
|
||||||
border-bottom-right-radius: var(--border-radius) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.segment[class*="bottom attached"] {
|
|
||||||
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.table > thead > tr:first-child > th {
|
|
||||||
&:first-child {
|
|
||||||
border-radius: var(--border-radius) 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
border-radius: 0 var(--border-radius) 0 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
268
styles/public/radius.tsx
Normal file
268
styles/public/radius.tsx
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
import { css, otherThemeVars } from "src/types/vars";
|
||||||
|
|
||||||
|
// 全部圆角替换
|
||||||
|
export const radius = css`
|
||||||
|
.ui.form textarea,
|
||||||
|
.ui.form input:not([type]),
|
||||||
|
.ui.form input[type="date"],
|
||||||
|
.ui.form input[type="datetime-local"],
|
||||||
|
.ui.form input[type="email"],
|
||||||
|
.ui.form input[type="number"],
|
||||||
|
.ui.form input[type="password"],
|
||||||
|
.ui.form input[type="search"],
|
||||||
|
.ui.form input[type="tel"],
|
||||||
|
.ui.form input[type="time"],
|
||||||
|
.ui.form input[type="text"],
|
||||||
|
.ui.form input[type="file"],
|
||||||
|
.ui.form input[type="url"] {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
&:focus {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ui.form select {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.input {
|
||||||
|
textarea,
|
||||||
|
input {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui {
|
||||||
|
&.menu,
|
||||||
|
&.modal,
|
||||||
|
&.label,
|
||||||
|
&.table,
|
||||||
|
&.segment,
|
||||||
|
&.segments,
|
||||||
|
&.grid.segment &.selection.dropdown,
|
||||||
|
&.horizontal.segments,
|
||||||
|
&.active.empty.selection.dropdown {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.dropdown,
|
||||||
|
.ui.inline.dropdown,
|
||||||
|
.ui.pointing.upward.dropdown,
|
||||||
|
.ui.top.pointing.upward.dropdown {
|
||||||
|
.menu {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.search > .results,
|
||||||
|
.ui.search.selection .prompt,
|
||||||
|
.ui.pointing.dropdown > .menu,
|
||||||
|
.ui.loading.form.segments:before,
|
||||||
|
.ui.secondary.menu .dropdown.item > .menu,
|
||||||
|
.ui.segments:not(.horizontal) > .segment:has(~ .tw-hidden) {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 全部圆角替换(原CSS带!important)
|
||||||
|
export const radiusImportant = css`
|
||||||
|
.ui.dropdown .menu .menu,
|
||||||
|
.ui.dropdown .menu .left.menu,
|
||||||
|
.ui.dropdown .menu .right.menu,
|
||||||
|
.ui.dropdown > .left.menu .menu,
|
||||||
|
.ui.floating.dropdown .menu,
|
||||||
|
.ui.floating.dropdown > .menu,
|
||||||
|
.ui.dropdown .right.menu > .menu,
|
||||||
|
.ui.secondary.vertical.menu > .item {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} !important;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 上半部分圆角替换
|
||||||
|
export const radiusTop = css`
|
||||||
|
.ui.vertical.menu > .item,
|
||||||
|
.ui.vertical.menu > .active.item,
|
||||||
|
.ui.segments:not(.horizontal) > .segment {
|
||||||
|
&:first-child {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.top.attached.header,
|
||||||
|
.ui.upward.dropdown > .menu,
|
||||||
|
.ui.upward.dropdown.button:not(.pointing):not(.floating).active,
|
||||||
|
.ui[class*="top attached"].menu,
|
||||||
|
.ui[class*="top attached"].segment,
|
||||||
|
.ui[class*="top attached"].segment:last-child,
|
||||||
|
.ui.search > .results > :first-child,
|
||||||
|
.ui.modal > i.icon:first-child + *,
|
||||||
|
.ui.modal > .dimmer:first-child + i.icon + *,
|
||||||
|
.ui.modal > .dimmer:first-child + *:not(.icon),
|
||||||
|
.ui.modal > :first-child:not(.icon):not(.dimmer) {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 上半部分圆角替换(原CSS带!important)
|
||||||
|
export const radiusTopImportant = css`
|
||||||
|
.ui.tabular.menu .active.item {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0 !important;
|
||||||
|
&:hover {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ui.simple.upward.dropdown {
|
||||||
|
&.active {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0 !important;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 下半部分圆角替换
|
||||||
|
export const radiusBottom = css`
|
||||||
|
.ui.attached.segment,
|
||||||
|
.ui.vertical.menu > .item,
|
||||||
|
.ui.vertical.menu > .active.item,
|
||||||
|
.ui.segments:not(.horizontal) > .segment {
|
||||||
|
&:last-child {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.modal,
|
||||||
|
.ui.search > .results {
|
||||||
|
> :last-child {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.selection.dropdown,
|
||||||
|
.ui.menu .dropdown.item {
|
||||||
|
.menu {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.bottom.attached.header,
|
||||||
|
.ui[class*="bottom attached"].table,
|
||||||
|
.ui.segment[class*="bottom attached"],
|
||||||
|
.ui.attached.segment:has(+ .ui.modal),
|
||||||
|
.ui.attached.segment:has(+ .page.buttons),
|
||||||
|
.ui.attached.segment:has(+ .ui[class*="top attached"].header),
|
||||||
|
.ui.segment:has(+ .ui.segment:not(.attached)) {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 下半部分圆角替换(原CSS带!important)
|
||||||
|
export const radiusBottomImportant = css`
|
||||||
|
.ui.upward.selection.dropdown.visible,
|
||||||
|
.ui.active.upward.selection.dropdown {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} !important;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 左半部分圆角替换
|
||||||
|
export const radiusLeft = css`
|
||||||
|
.ui.menu > .item,
|
||||||
|
.ui.action.input > .button,
|
||||||
|
.ui.action.input > .dropdown,
|
||||||
|
.ui.horizontal.segments > .segment {
|
||||||
|
&:first-child {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} 0 0 ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui[class*="left icon"].input > i.icon,
|
||||||
|
.ui.action.input > .buttons:first-child > .button {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} 0 0 ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 右半部分圆角替换
|
||||||
|
export const radiusRight = css`
|
||||||
|
.ui.compact.menu .item,
|
||||||
|
.ui.compact.menu:not(.secondary) .item,
|
||||||
|
.ui.pagination.menu .item,
|
||||||
|
.ui.action.input > .button,
|
||||||
|
.ui.action.input > .dropdown,
|
||||||
|
.ui.horizontal.segments > .segment {
|
||||||
|
&:last-child {
|
||||||
|
border-radius: 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.icon.input > i.icon,
|
||||||
|
.ui.buttons .unescape-button,
|
||||||
|
.ui.action.input > .buttons:last-child > .button {
|
||||||
|
border-radius: 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 左上圆角替换
|
||||||
|
export const radiusTopLeft = css`
|
||||||
|
.ui.top.attached.menu > .item:first-child,
|
||||||
|
.ui.table > thead > tr:first-child > th:first-child {
|
||||||
|
border-top-left-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 右上圆角替换
|
||||||
|
export const radiusTopRight = css`
|
||||||
|
.ui.table > thead > tr:first-child > th:last-child,
|
||||||
|
.ui.category.search > .results .category:first-child .name + .result {
|
||||||
|
border-top-right-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 左下圆角替换
|
||||||
|
export const radiusBottomLeft = css`
|
||||||
|
.ui.table > tfoot > tr:first-child {
|
||||||
|
> th,
|
||||||
|
> td {
|
||||||
|
&:first-child {
|
||||||
|
border-bottom-left-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// 右下圆角替换
|
||||||
|
export const radiusBottomRight = css`
|
||||||
|
.ui.table > tfoot > tr:first-child {
|
||||||
|
> th,
|
||||||
|
> td {
|
||||||
|
&:last-child {
|
||||||
|
border-bottom-right-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.category.search > .results .category:last-child .result:last-child {
|
||||||
|
border-bottom-right-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
// only-child 顺序最后生效
|
||||||
|
export const onlyChild = css`
|
||||||
|
.ui.vertical.menu > .active.item:only-child,
|
||||||
|
.ui.segments:not(.horizontal) > .segment:only-child {
|
||||||
|
border-radius: ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.table > thead > tr:first-child > th:only-child {
|
||||||
|
border-radius: ${otherThemeVars.border.radius} ${otherThemeVars.border.radius} 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.table > tfoot > tr:first-child {
|
||||||
|
> th,
|
||||||
|
> td {
|
||||||
|
&:only-child {
|
||||||
|
border-radius: 0 0 ${otherThemeVars.border.radius} ${otherThemeVars.border.radius};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
@@ -41,14 +41,15 @@ const github: GithubColor = {
|
|||||||
muted: "#bb800926",
|
muted: "#bb800926",
|
||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
|
emphasis: "#238636",
|
||||||
muted: "#2ea04326",
|
muted: "#2ea04326",
|
||||||
},
|
},
|
||||||
danger: {
|
danger: {
|
||||||
muted: "#f851491a",
|
muted: "#f851491a",
|
||||||
},
|
},
|
||||||
// done: {
|
done: {
|
||||||
// emphasis: "#8957e5",
|
emphasis: "#8957e5",
|
||||||
// },
|
},
|
||||||
default: "#0d1117",
|
default: "#0d1117",
|
||||||
inset: "#010409",
|
inset: "#010409",
|
||||||
muted: "#151b23",
|
muted: "#151b23",
|
||||||
|
|||||||
Reference in New Issue
Block a user