Skip to content

Commit f109afa

Browse files
authoredOct 23, 2024··
fix(Switch): 未選択時のコントラスト比を 3:1 確保する (#5027)
1 parent af99af1 commit f109afa

File tree

1 file changed

+2
-1
lines changed
  • packages/smarthr-ui/src/components/Switch

1 file changed

+2
-1
lines changed
 

‎packages/smarthr-ui/src/components/Switch/Switch.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const switchStyle = tv({
2121
'supports-[not_selector(:has(+_*))]:shr-border-[revert] supports-[not_selector(:has(+_*))]:shr-bg-[revert]',
2222

2323
// Switch ツマミ
24-
'before:shr-box-border before:shr-inline-block before:shr-size-[theme(fontSize.base)] before:shr-scale-[calc(2/3)] before:shr-rounded-full before:shr-border before:shr-border-solid before:shr-border-[theme(colors.grey.30)] before:shr-bg-[theme(colors.grey.30)] before:shr-transition-[transform,margin] before:shr-duration-150 before:shr-ease-out before:shr-content-[""]',
24+
'before:shr-box-border before:shr-inline-block before:shr-size-[theme(fontSize.base)] before:shr-scale-[calc(2/3)] before:shr-rounded-full before:shr-border before:shr-border-solid before:shr-border-[theme(textColor.grey)] before:shr-bg-[theme(textColor.grey)] before:shr-transition-[transform,margin] before:shr-duration-150 before:shr-ease-out before:shr-content-[""]',
25+
'has-[input:disabled:not(:checked)]:before:shr-border-[theme(textColor.disabled)] has-[input:disabled:not(:checked)]:before:shr-bg-[theme(textColor.disabled)]',
2526
'has-[:checked]:before:shr-border-shorthand has-[:checked]:before:shr-ms-[theme(fontSize.base)] has-[:checked]:before:shr-scale-100 has-[:checked]:before:shr-bg-white',
2627
'forced-colors:has-[input:not(:disabled)]:before:shr-bg-[ButtonBorder]',
2728
'forced-colors:has-[:disabled:not(:checked)]:before:shr-border-solid forced-colors:has-[:disabled:not(:checked)]:before:shr-border-[GrayText]',

0 commit comments

Comments
 (0)
Please sign in to comment.