fix(radio): radio button styles

This commit is contained in:
07akioni 2020-08-27 12:49:09 +08:00
parent 4035919c4b
commit 6aa378f59c
3 changed files with 7 additions and 9 deletions

View File

@ -10,10 +10,10 @@ export default c([
buttonTextColorActive,
buttonTextColorHover,
disabledOpacity,
borderMaskWidth,
buttonBoxShadowFocus,
buttonBoxShadowHover,
buttonBorderRadius
buttonBorderRadius,
buttonBoxShadow
} = props.$local
const {
easeInOutCubicBezier
@ -64,7 +64,7 @@ export default c([
raw: `
pointer-events: none;
position: absolute;
box-shadow: inset 0 0 0 ${borderMaskWidth} transparent;
box-shadow: ${buttonBoxShadow};
transition: box-shadow .3s ${easeInOutCubicBezier};
left: -1px;
bottom: -1px;

View File

@ -18,7 +18,6 @@ export default create({
const {
borderRadius
} = base
const borderMaskWidth = '1px'
return {
...commonVariables,
boxShadow: `inset 0 0 0 1px ${borderOverlayColor}`,
@ -41,9 +40,9 @@ export default create({
buttonTextColorActive: baseBackgroundColor,
buttonTextColorHover: primaryColor,
disabledOpacity: disabledOpacity,
borderMaskWidth: borderMaskWidth,
buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`,
buttonBoxShadowHover: `inset 0 0 0 ${borderMaskWidth} ${primaryColor}`,
buttonBoxShadowHover: `inset 0 0 0 1px ${primaryColor}`,
buttonBoxShadow: 'inset 0 0 0 1px transparent',
buttonBorderRadius: borderRadius
}
}

View File

@ -18,7 +18,6 @@ export default create({
const {
borderRadius
} = base
const borderMaskWidth = '0px'
return {
...commonVariables,
boxShadow: `inset 0 0 0 1px ${borderColor}`,
@ -41,9 +40,9 @@ export default create({
buttonTextColorActive: primaryColor,
buttonTextColorHover: primaryColor,
disabledOpacity: disabledOpacity,
borderMaskWidth: borderMaskWidth,
buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`,
buttonBoxShadowHover: `inset 0 0 0 ${borderMaskWidth} transparent`,
buttonBoxShadowHover: `inset 0 0 0 1px transparent`,
buttonBoxShadow: 'inset 0 0 0 1px transparent',
buttonBorderRadius: borderRadius
}
}