From ca9c7c7e30f86d6dbe0f4aa6cec48a4451b209ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Tue, 18 Jul 2023 21:15:58 +0800 Subject: [PATCH] fix: Indeterminate & checked style (#43626) --- components/checkbox/style/index.ts | 47 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/components/checkbox/style/index.ts b/components/checkbox/style/index.ts index 5f949c574e..50502085e4 100644 --- a/components/checkbox/style/index.ts +++ b/components/checkbox/style/index.ts @@ -146,28 +146,6 @@ export const genCheckboxStyle: GenerateStyle = (token) => { }, }, - // ================= Indeterminate ================= - { - [checkboxCls]: { - '&-indeterminate': { - // Wrapper > Checkbox > inner - [`${checkboxCls}-inner`]: { - '&:after': { - top: '50%', - insetInlineStart: '50%', - width: token.fontSizeLG / 2, - height: token.fontSizeLG / 2, - backgroundColor: token.colorPrimary, - border: 0, - transform: 'translate(-50%, -50%) scale(1)', - opacity: 1, - content: '""', - }, - }, - }, - }, - }, - // ===================== Hover ===================== { // Wrapper @@ -245,6 +223,31 @@ export const genCheckboxStyle: GenerateStyle = (token) => { }, }, + // ================= Indeterminate ================= + { + [checkboxCls]: { + '&-indeterminate': { + // Wrapper > Checkbox > inner + [`${checkboxCls}-inner`]: { + backgroundColor: token.colorBgContainer, + borderColor: token.colorBorder, + + '&:after': { + top: '50%', + insetInlineStart: '50%', + width: token.fontSizeLG / 2, + height: token.fontSizeLG / 2, + backgroundColor: token.colorPrimary, + border: 0, + transform: 'translate(-50%, -50%) scale(1)', + opacity: 1, + content: '""', + }, + }, + }, + }, + }, + // ==================== Disable ==================== { // Wrapper