fix(web): 后台侧栏选中项改黑底反白,修复明暗模式下选中态看不清
自定义主题 colorPrimary 为近黑/近白,antd Menu 选中项默认的 primary 淡色底与侧栏底色对比不足;选中/hover 态改用 sidebar token(黑底反白/浅灰底),并覆盖此前对未选中文字色的误覆盖。
This commit is contained in:
@@ -1314,6 +1314,19 @@ button.pn-note-back:hover {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
/* 选中项沿用侧栏 token 的黑底反白(colorPrimary 近黑/近白,antd 默认的
|
||||
primary 淡色底在明暗模式下都与侧栏底色拉不开) */
|
||||
.pn-admin-menu li.ant-menu-item-selected {
|
||||
background: var(--sidebar-primary);
|
||||
color: var(--sidebar-primary-foreground);
|
||||
}
|
||||
.pn-admin-menu li.ant-menu-item-selected svg {
|
||||
color: var(--sidebar-primary-foreground);
|
||||
}
|
||||
.pn-admin-menu li.ant-menu-item:hover:not(.ant-menu-item-selected) {
|
||||
background: var(--sidebar-accent);
|
||||
color: var(--sidebar-accent-foreground);
|
||||
}
|
||||
.pn-admin-foot {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user