File tree 1 file changed +3
-3
lines changed
packages/smarthr-ui/src/components/Switch
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ const switchStyle = tv({
7
7
slots : {
8
8
wrapper : [
9
9
// Switch 本体
10
- 'shr-border-shorthand shr-relative shr-inline-flex shr-w-[calc(theme(fontSize.base)*2)] shr-items-center shr-rounded-full shr-bg-white' ,
10
+ 'shr-border-shorthand shr-relative shr-inline-flex shr-w-[calc(theme(fontSize.base)*2)] shr-items-center shr-rounded-full shr-bg-white shr-h-fit ' ,
11
11
// 理想的には padding: 2px; だが、box-shadow を outline で使用しているため、border と padding で2pxの疑似余白を作っている。
12
12
'shr-p-px' ,
13
- // :focus-visible-within の代替
14
- 'has-[:focus-visible]:shr-focus-indicator' ,
13
+ // :focus-visible-within の代替, なぜかhasが機能しないので以下の書き方で代用している
14
+ 'has-[:focus-visible]:shr-focus-indicator [&:has(:focus-visible)]:shr-focus-indicator ' ,
15
15
'has-[:checked]:shr-border-[theme(colors.main)] has-[:checked]:shr-bg-main' ,
16
16
'has-[:disabled]:shr-border-[theme(borderColor.default)] has-[:disabled]:shr-bg-border' ,
17
17
'forced-colors:has-[:disabled]:shr-border-[GrayText]' ,
You can’t perform that action at this time.
0 commit comments