Browse Source

fix: Indeterminate & checked style (#43626)

pull/43630/head
二货爱吃白萝卜 1 year ago
committed by GitHub
parent
commit
ca9c7c7e30
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 47
      components/checkbox/style/index.ts

47
components/checkbox/style/index.ts

@ -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 ===================== // ===================== Hover =====================
{ {
// Wrapper // 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 ==================== // ==================== Disable ====================
{ {
// Wrapper // Wrapper

Loading…
Cancel
Save