434161de5b
Release / release (push) Failing after 13s
- Removed `.github-theme` from .gitignore as it is no longer needed. - Updated `official-style-map.md` to clarify the maintenance of GitHub Light style increments within the current repository. - Revised `rules.md` to reflect the new approach to maintaining GitHub Light theme increments. - Changed test script in `package.json` to verify generated theme instead of GitHub migration. - Added `verify-generated-theme.ts` script to validate the generated theme files. - Migrated various styles from `.github-theme` to the new structure, updating comments and references accordingly.
128 lines
3.4 KiB
TypeScript
128 lines
3.4 KiB
TypeScript
|
|
export const verticalMenu = `
|
|
/* 垂直菜单, 用于左侧边栏 */
|
|
/* 设置页面中的菜单, Actions 工作流菜单, WorkflowRuns Job 菜单 */
|
|
.ui.vertical.menu {
|
|
/* 去除边框, 和背景色同色 */
|
|
background: var(--color-body);
|
|
border: 0;
|
|
/* 设置页面的菜单头部 */
|
|
.header.item {
|
|
color: var(--color-text-light-1) !important;
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
background: unset;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
/* 菜单项被悬停时的背景色, 限制a标签, 避免为子菜单多余渲染 */
|
|
a.item {
|
|
&:hover {
|
|
background: var(--github-control-transparent-bgColor-hover);
|
|
}
|
|
&:active {
|
|
background-color: var(--github-control-transparent-bgColor-active);
|
|
}
|
|
}
|
|
/* 菜单项 */
|
|
.item,
|
|
.item > summary {
|
|
font-size: 1.1rem;
|
|
background: unset;
|
|
border-radius: var(--border-radius);
|
|
padding: 6px 8px;
|
|
}
|
|
/* Actions 菜单的圆角覆盖 */
|
|
> .item,
|
|
> .active.item {
|
|
&:first-child,
|
|
&:last-child {
|
|
border-radius: var(--border-radius);
|
|
}
|
|
}
|
|
/* 去除菜单项的边框线 */
|
|
.item:before {
|
|
background: unset;
|
|
}
|
|
/* 激活的菜单项 */
|
|
.active.item,
|
|
.active.item > summary {
|
|
font-weight: 600;
|
|
border-radius: var(--border-radius);
|
|
}
|
|
/* 添加伪元素, 用于指示当前激活的菜单项 */
|
|
.active.item:after {
|
|
content: "";
|
|
background-color: var(--github-borderColor-accent-emphasis);
|
|
border-radius: var(--border-radius);
|
|
height: 24px;
|
|
left: -8px;
|
|
position: absolute;
|
|
top: calc(50% - 12px);
|
|
width: 4px;;
|
|
}
|
|
/* 部分菜单项的子菜单 */
|
|
details.item {
|
|
/* 子菜单的标题 */
|
|
summary:hover {
|
|
background: var(--github-control-transparent-bgColor-hover);
|
|
}
|
|
/* 子菜单的选项 */
|
|
.menu .item {
|
|
color: var(--color-text);
|
|
}
|
|
/* 子菜单的选项被激活 */
|
|
&:has(.active.item) {
|
|
> summary {
|
|
font-weight: 600;
|
|
background: var(--color-active);
|
|
/* 收回状态,悬停色 */
|
|
&:hover {
|
|
background: var(--github-control-transparent-bgColor-hover);
|
|
}
|
|
&:active {
|
|
background-color: var(--github-control-transparent-bgColor-active);
|
|
}
|
|
}
|
|
&:after {
|
|
content: "";
|
|
background-color: var(--github-borderColor-accent-emphasis);
|
|
border-radius: var(--border-radius);
|
|
height: 24px;
|
|
left: -8px;
|
|
position: absolute;
|
|
top: calc(50% - 12px);
|
|
width: 4px;;
|
|
}
|
|
/* 子菜单的选项 */
|
|
.active.item {
|
|
background: var(--color-active);
|
|
font-weight: 400;
|
|
&:hover {
|
|
background: var(--github-control-transparent-bgColor-hover);
|
|
}
|
|
&:active {
|
|
background-color: var(--github-control-transparent-bgColor-active);
|
|
}
|
|
}
|
|
/* 子菜单展开时 */
|
|
&[open] {
|
|
> summary {
|
|
background: unset;
|
|
&:hover {
|
|
background: var(--github-control-transparent-bgColor-hover);
|
|
}
|
|
&:active {
|
|
background-color: var(--github-control-transparent-bgColor-active);
|
|
}
|
|
}
|
|
&:after {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const stylesheet = [verticalMenu].join("\n\n");
|