From 33edd785313537cb858a4a11b50551c3cb37e7de Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sat, 3 Feb 2024 10:21:21 +0800 Subject: [PATCH] style: fix color of more button and scrollbar style (#3486) * style(header): fix color of more button * style: fix scrollbar style --- packages/core/client/src/global.less | 70 +++++++++---------- packages/core/client/src/index.ts | 1 + .../route-switch/antd/admin-layout/index.tsx | 3 + 3 files changed, 38 insertions(+), 36 deletions(-) diff --git a/packages/core/client/src/global.less b/packages/core/client/src/global.less index 6c9a307ee..0d59a4cc3 100644 --- a/packages/core/client/src/global.less +++ b/packages/core/client/src/global.less @@ -1,37 +1,35 @@ -.win { - /* width */ - ::-webkit-scrollbar { - width: 8px; - height: 8px; - } - - /* Track */ - ::-webkit-scrollbar-track { - background: var(--colorBgScrollTrack); - } - - /* Handle */ - ::-webkit-scrollbar-thumb { - background: var(--colorBgScrollBar); - border-radius: 4px; - } - - /* Handle on hover */ - ::-webkit-scrollbar-thumb:hover { - background: var(--colorBgScrollBarHover); - } - - ::-webkit-scrollbar-thumb:active { - background: var(--colorBgScrollBarActive); - } - - .rc-virtual-list-scrollbar-thumb { - background: var(--colorBgScrollBar) !important; - } - .rc-virtual-list-scrollbar-thumb:hover { - background: var(--colorBgScrollBarHover) !important; - } - .rc-virtual-list-scrollbar-thumb:active { - background: var(--colorBgScrollBarActive) !important; - } +/* width */ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +/* Track */ +::-webkit-scrollbar-track { + background: var(--colorBgScrollTrack); +} + +/* Handle */ +::-webkit-scrollbar-thumb { + background: var(--colorBgScrollBar); + border-radius: 4px; +} + +/* Handle on hover */ +::-webkit-scrollbar-thumb:hover { + background: var(--colorBgScrollBarHover); +} + +::-webkit-scrollbar-thumb:active { + background: var(--colorBgScrollBarActive); +} + +.rc-virtual-list-scrollbar-thumb { + background: var(--colorBgScrollBar) !important; +} +.rc-virtual-list-scrollbar-thumb:hover { + background: var(--colorBgScrollBarHover) !important; +} +.rc-virtual-list-scrollbar-thumb:active { + background: var(--colorBgScrollBarActive) !important; } diff --git a/packages/core/client/src/index.ts b/packages/core/client/src/index.ts index c2bf282cf..3b9acfb3c 100644 --- a/packages/core/client/src/index.ts +++ b/packages/core/client/src/index.ts @@ -10,6 +10,7 @@ import 'dayjs/plugin/weekday'; // 重置浏览器样式 import 'antd/dist/reset.css'; +import './global.less'; export * from '@emotion/css'; export * from './acl'; diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx index e7b18f3d4..a603f88e2 100644 --- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx +++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx @@ -279,6 +279,9 @@ export const InternalAdminLayout = (props: any) => { background-color: ${token.colorBgHeaderMenuActive} !important; color: ${token.colorTextHeaderMenuActive} !important; } + .ant-menu-submenu-horizontal.ant-menu-submenu-selected > .ant-menu-submenu-title { + color: ${token.colorTextHeaderMenuActive} !important; + } .ant-menu-dark.ant-menu-horizontal > .ant-menu-item:hover { background-color: ${token.colorBgHeaderMenuHover} !important; color: ${token.colorTextHeaderMenuHover} !important;