@@ -12,10 +12,15 @@ governing permissions and limitations under the License.
12
12
13
13
/* THIS FILE IS MACHINE GENERATED. DO NOT EDIT */
14
14
: host {
15
+ - - spectrum- clear- butto n- height: var(--spectrum-component-height-100 );
16
+ - - spectrum- clear- butto n- width: var(- - spectrum- component- height-100);
17
+ - - spectrum- clear- butto n- padding: var(- - spectrum- in- field- butto n- edge-to - fill);
18
+ - - spectrum- clear- butto n- icon- color : var(- - spectrum- neutral- content- color - default);
19
+ - - spectrum- clear- butto n- icon- color - hover: var(- - spectrum- neutral- content- color - hover);
20
+ - - spectrum- clear- butto n- icon- color - down: var(- - spectrum- neutral- content- color - down);
21
+ - - spectrum- clear- butto n- icon- color - key- focus: var(- - spectrum- neutral- content- color - key- focus);
15
22
block- size: var(- - mod- clear- butto n- height, var (- - spectrum- clear- butto n- height));
16
23
inline-size: var(- - mod- clear- butto n- width, var (- - spectrum- clear- butto n- width));
17
- cursor : pointer;
18
- background- color : initial;
19
24
background- color : var(- - mod- clear- butto n- background- color , transparent );
20
25
padding: var(- - mod- clear- butto n- padding, var (- - spectrum- clear- butto n- padding));
21
26
color : var(- - mod- clear- butto n- icon- color , var (- - spectrum- clear- butto n- icon- color ));
@@ -24,47 +29,84 @@ governing permissions and limitations under the License.
24
29
margin: 0;
25
30
}
26
31
32
+ : host ([size= 's']) {
33
+ --spectrum-clear-button-height : var (--spectrum-component-height-75 );
34
+ --spectrum-clear-button-width : var (--spectrum-component-height-75 );
35
+ }
36
+
37
+ : host ([size = 'l' ]) {
38
+ --spectrum-clear-button-height : var (--spectrum-component-height-200 );
39
+ --spectrum-clear-button-width : var (--spectrum-component-height-200 );
40
+ }
41
+
42
+ : host ([size = 'xl' ]) {
43
+ --spectrum-clear-button-height : var (--spectrum-component-height-300 );
44
+ --spectrum-clear-button-width : var (--spectrum-component-height-300 );
45
+ }
46
+
47
+ : host .spectrum-ClearButton--quiet {
48
+ --mod-clear-button-background-color : transparent;
49
+ --mod-clear-button-background-color-hover : transparent;
50
+ --mod-clear-button-background-color-down : transparent;
51
+ --mod-clear-button-background-color-key-focus : transparent;
52
+ }
53
+
54
+ : host .spectrum-ClearButton--staticWhite {
55
+ --mod-clear-button-icon-color : var (--spectrum-white );
56
+ --mod-clear-button-icon-color-hover : var (--spectrum-white );
57
+ --mod-clear-button-icon-color-down : var (--spectrum-white );
58
+ --mod-clear-button-icon-color-key-focus : var (--spectrum-white );
59
+ --mod-clear-button-icon-color-disabled : var (--spectrum-disabled-static-white-content-color );
60
+ --mod-clear-button-background-color : transparent;
61
+ }
62
+
63
+ : host ([disabled ]),
64
+ : host ([disabled ]) {
65
+ --mod-clear-button-icon-color : var (--mod-clear-button-icon-color-disabled , var (--spectrum-disabled-content-color ));
66
+ --mod-clear-button-icon-color-hover : var (--spectrum-disabled-content-color );
67
+ --mod-clear-button-icon-color-down : var (--spectrum-disabled-content-color );
68
+ --mod-clear-button-background-color : var (--mod-clear-button-background-color-disabled , transparent);
69
+ }
70
+
71
+ : host : not (: disabled ) {
72
+ cursor : pointer;
73
+ }
74
+
27
75
.icon {
28
76
margin-block : 0 ;
29
77
margin-inline : auto;
30
78
}
31
79
32
80
@media (hover : hover) {
33
- : host ( : hover ) {
81
+ : host : not ( : disabled ) : hover {
34
82
color : var (--highcontrast-clear-button-icon-color-hover , var (--mod-clear-button-icon-color-hover , var (--spectrum-clear-button-icon-color-hover )));
35
83
}
36
84
37
- : host ( : hover ) .fill {
85
+ : host : not ( : disabled ) : hover .fill {
38
86
background-color : var (--mod-clear-button-background-color-hover , var (--spectrum-clear-button-background-color-hover ));
39
87
}
40
88
}
41
89
42
- : host (: is (: active , [active ])) {
90
+ : host (: is (: active , [active ])): not ( : disabled ) {
43
91
color : var (--mod-clear-button-icon-color-down , var (--spectrum-clear-button-icon-color-down ));
44
92
}
45
93
46
- : host (: is (: active , [active ])) .fill {
94
+ : host (: is (: active , [active ])): not ( : disabled ) .fill {
47
95
background-color : var (--mod-clear-button-background-color-down , var (--spectrum-clear-button-background-color-down ));
48
96
}
49
97
50
- : host ([focus-within ]) .js-focus-within ,
51
- : host (: focus-visible ),
52
- : host : focus- within,
53
- : host ([focus-within ]) .js-focus-within {
98
+ : host : not (: disabled ): focus-visible ,
99
+ : host : not (: disabled ): focus-within {
54
100
color : var (--mod-clear-button-icon-color-key-focus , var (--spectrum-clear-button-icon-color-key-focus ));
55
101
}
56
102
57
- : host ([focus-within ]) .js-focus-within .fill ,
58
- : host (: focus-visible ) .fill ,
59
- : host : focus- within .fill ,
60
- : host ([focus-within ]) .js-focus-within .fill {
103
+ : host : not (: disabled ): focus-visible .fill ,
104
+ : host : not (: disabled ): focus-within .fill {
61
105
background-color : var (--mod-clear-button-background-color-key-focus , var (--spectrum-clear-button-background-color-key-focus ));
62
106
}
63
107
64
- : host ([disabled ]),
65
- : host ([disabled ]) {
66
- --spectrum-clear-button-icon-color : var (--mod-clear-button-icon-color-disabled , var (--spectrum-disabled-content-color ));
67
- --spectrum-clear-button-background-color : var (--mod-clear-button-background-color-disabled , transparent);
108
+ .spectrum-ClearButton-icon {
109
+ color : inherit;
68
110
}
69
111
70
112
.fill {
@@ -77,7 +119,8 @@ governing permissions and limitations under the License.
77
119
display : flex;
78
120
}
79
121
80
- : host ([variant = 'overBackground' ]: focus-visible ) {
122
+ : host ([variant = 'overBackground' ]: focus-visible ),
123
+ .spectrum-ClearButton--staticWhite : focus-visible {
81
124
outline : none;
82
125
}
83
126
0 commit comments