fix: Indeterminate & checked style (#43626)

This commit is contained in:
二货爱吃白萝卜 2023-07-18 21:15:58 +08:00 committed by GitHub
parent cf40fb02b9
commit ca9c7c7e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,28 +146,6 @@ export const genCheckboxStyle: GenerateStyle<CheckboxToken> = (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<CheckboxToken> = (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