fix: radio and checkbox box-sizing (#37529)

This commit is contained in:
MadCcc 2022-09-13 17:21:59 +08:00 committed by GitHub
parent 83447e5b2c
commit 02f41204e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,7 @@ export const genCheckboxStyle: GenerateStyle<CheckboxToken> = token => {
// Wrapper > Checkbox > inner
[`${checkboxCls}-inner`]: {
boxSizing: 'border-box',
position: 'relative',
top: 0,
insetInlineStart: 0,
@ -109,6 +110,7 @@ export const genCheckboxStyle: GenerateStyle<CheckboxToken> = token => {
transition: `all ${token.motionDurationFast}`,
'&:after': {
boxSizing: 'border-box',
position: 'absolute',
top: '50%',
insetInlineStart: '21.5%',

View File

@ -155,6 +155,7 @@ const getRadioBasicStyle: GenerateStyle<RadioToken> = token => {
[`${componentCls}-inner`]: {
'&::after': {
boxSizing: 'border-box',
position: 'absolute',
insetBlockStart: '50%',
insetInlineStart: '50%',
@ -173,6 +174,7 @@ const getRadioBasicStyle: GenerateStyle<RadioToken> = token => {
content: '""',
},
boxSizing: 'border-box',
position: 'relative',
insetBlockStart: 0,
insetInlineStart: 0,