diff --git a/packages/design/package.json b/packages/design/package.json index b2545be9d..a99d7b078 100644 --- a/packages/design/package.json +++ b/packages/design/package.json @@ -31,8 +31,7 @@ "LICENSE" ], "scripts": { - "build": "father build", - "postbuild": "cp src/style/reset.css dist/" + "build": "father build && cp src/style/reset.css dist/" }, "dependencies": { "@ant-design/cssinjs": "^1.22.0", diff --git a/packages/design/src/global.css b/packages/design/src/global.css new file mode 100644 index 000000000..9044c2e3c --- /dev/null +++ b/packages/design/src/global.css @@ -0,0 +1,16 @@ +@import 'antd/dist/reset.css'; + +pre, +code, +kbd, +samp { + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; +} + +* { + scrollbar-color: #e2e8f3 transparent; +} + +.rc-virtual-list-scrollbar-thumb { + background: #e2e8f3 !important; +} diff --git a/packages/design/src/index.ts b/packages/design/src/index.ts index a315aa483..d7c45a2b4 100644 --- a/packages/design/src/index.ts +++ b/packages/design/src/index.ts @@ -1,4 +1,4 @@ -import './reset.css'; +import './global.css'; export * from 'antd'; export { version } from '../package.json'; diff --git a/packages/design/src/reset.css b/packages/design/src/reset.css deleted file mode 100644 index b7a1de3a2..000000000 --- a/packages/design/src/reset.css +++ /dev/null @@ -1,18 +0,0 @@ -/* 引入 antd/dist/reset.css,以重置基本样式,保证原生元素遵从 antd 规范样式 */ -/* ref: https://ant.design/docs/react/migration-v5-cn#%E6%8A%80%E6%9C%AF%E8%B0%83%E6%95%B4 */ -@import '~antd/dist/reset.css'; - -pre, -code, -kbd, -samp { - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; -} - -* { - scrollbar-color: #e2e8f3 transparent; -} - -.rc-virtual-list-scrollbar-thumb { - background: #e2e8f3 !important; -}