@@ -12,20 +12,22 @@ $theme: $indigo;
1212 }
1313}
1414
15- [part ~= ' base' ] {
16- gap : rem (8px );
15+ :host (:hover ) {
16+ [part ~= ' control' ]::after {
17+ border : rem (2px ) solid var-get ($theme , ' hover-color' );
18+ }
1719
18- & :hover {
19- [part ~= ' label' ] {
20- color : var-get ($theme , ' label-color-hover' );
21- }
20+ [part = ' control checked' ]::after {
21+ border-color : var-get ($theme , ' fill-hover-border-color' );
2222 }
2323}
2424
25+ [part ~= ' base' ] {
26+ gap : rem (8px );
27+ }
28+
2529[part ~= ' label' ] {
2630 @include type-style (' body-2' );
27-
28- color : var-get ($theme , ' label-color' );
2931}
3032
3133[part ~= ' control' ] {
@@ -36,7 +38,6 @@ $theme: $indigo;
3638 height : var (--size , rem (20px ));
3739 min-width : var (--size , rem (20px ));
3840 transition : none ;
39- background : none ;
4041
4142 & ::before ,
4243 & ::after {
@@ -46,12 +47,6 @@ $theme: $indigo;
4647 & ::after {
4748 border : rem (2px ) solid var-get ($theme , ' empty-color' );
4849 }
49-
50- & :hover {
51- & ::after {
52- border : rem (2px ) solid var-get ($theme , ' hover-color' );
53- }
54- }
5550}
5651
5752[part = ' control checked' ] {
@@ -96,20 +91,14 @@ $theme: $indigo;
9691 }
9792 }
9893
99- [part = ' label' ] {
94+ [part ~ =' label' ] {
10095 color : var-get ($theme , ' label-color' );
10196 }
10297
10398 [part = ' control' ] {
10499 & ::after {
105100 border-color : var-get ($theme , ' error-color' );
106101 }
107-
108- & :hover {
109- & ::after {
110- border-color : var-get ($theme , ' error-color-hover' );
111- }
112- }
113102 }
114103
115104 [part = ' control checked' ] {
@@ -120,16 +109,6 @@ $theme: $indigo;
120109 & ::before {
121110 background : var-get ($theme , ' error-color' );
122111 }
123-
124- & :hover {
125- & ::after {
126- border-color : var-get ($theme , ' error-color-hover' );
127- }
128-
129- & ::before {
130- background : var-get ($theme , ' error-color-hover' );
131- }
132- }
133112 }
134113
135114 [part ~= ' focused' ] {
@@ -140,21 +119,12 @@ $theme: $indigo;
140119 }
141120}
142121
143- :host ([disabled ]),
144- :host (:disabled ) {
145- [part = ' control' ] {
146- & ::after {
147- border-color : var-get ($theme , ' disabled-color' );
148- }
149- }
150-
122+ :host (:not ([disabled ]):state(ig-invalid):hover ),
123+ :host (:not (:disabled ):state(ig-invalid):hover ) {
151124 [part = ' control checked' ] {
152- & ::after {
153- border-color : var-get ($theme , ' disabled-fill-color' );
154- }
155-
156125 & ::before {
157- background : var-get ($theme , ' disabled-fill-color' );
126+ background : var-get ($theme , ' error-color-hover' );
127+ border-color : var-get ($theme , ' error-color-hover' );
158128 }
159129 }
160130}
0 commit comments