@@ -30,8 +30,8 @@ governing permissions and limitations under the License.
30
30
--spectrum-swatch-focus-ring-thickness : var (--spectrum-focus-ring-thickness );
31
31
--spectrum-swatch-focus-ring-gap : var (--spectrum-focus-ring-gap );
32
32
33
+ /* Color */
33
34
--spectrum-swatch-border-color : var (--spectrum-swatch-border-color );
34
- /* --spectrum-swatch-border-color-selected: var(--spectrum-gray-900); */
35
35
--spectrum-swatch-inner-border-color-selected : var (--spectrum-gray-50 );
36
36
--spectrum-swatch-disabled-icon-border-color : var (--spectrum-swatch-disabled-icon-border-color );
37
37
--spectrum-swatch-disabled-icon-color : var (--spectrum-white );
@@ -67,30 +67,23 @@ governing permissions and limitations under the License.
67
67
68
68
/* Windows high contrast mode */
69
69
@media (forced-colors : active) {
70
- .spectrum-Swatch-fill {
71
- forced-color-adjust : none;
72
- }
73
70
.spectrum-Swatch {
74
71
--highcontrast-swatch-disabled-icon-color : grayText;
75
- --highcontrast-swatch-focus-ring-color : ButtonText ;
72
+ --highcontrast-swatch-focus-ring-color : Highlight ;
76
73
--highcontrast-swatch-border-color-selected : Highlight;
77
74
--highcontrast-swatch-border-color : ButtonText;
78
- --highcontrast-swatch-border-color-light : ButtonText;
79
- /* --highcontrast-swatch-fill-background-color-selected: ButtonFace; */
80
75
--highcontrast-swatch-fill-background-color : ButtonFace;
76
+ --highcontrast-swatch-fill-foreground-color : ButtonText;
77
+
78
+ .spectrum-Swatch-fill {
79
+ forced-color-adjust : none;
80
+ }
81
+
81
82
& .is-disabled {
82
83
.spectrum-Swatch-fill {
83
84
forced-color-adjust : auto;
84
85
}
85
86
}
86
- /* Slash */
87
- & .is-nothing {
88
- .spectrum-Swatch-fill {
89
- & : after {
90
- background : ButtonText;
91
- }
92
- }
93
- }
94
87
}
95
88
}
96
89
@@ -141,7 +134,7 @@ governing permissions and limitations under the License.
141
134
}
142
135
}
143
136
144
- /* Swatch fill with transparent background-color for images, gradients, and svgs */
137
+ /* Swatch fill: Image, Gradient, SVG */
145
138
& .is-image {
146
139
.spectrum-Swatch-fill {
147
140
& ::before {
@@ -161,18 +154,18 @@ governing permissions and limitations under the License.
161
154
}
162
155
}
163
156
157
+ /* Swatch fill: Not fill with Slash */
164
158
& .is-nothing {
165
159
.spectrum-Swatch-fill {
166
160
background-color : var (--highcontrast-swatch-fill-background-color , var (--mod-swatch-fill-background-color , var (--spectrum-swatch-fill-background-color )));
167
161
168
- /* Slash */
169
162
& : after {
170
163
height : var (--mod-swatch-slash-thickness , var (--spectrum-swatch-slash-thickness ));
171
164
content : '' ;
172
165
position : absolute;
173
166
transform : rotate (-45deg );
174
167
width : 200% ; /* just needs to be bigger than a swatch */
175
- background : var (--spectrum-swatch-slash-icon-color );
168
+ background : var (--highcontrast-swatch-fill-foreground-color , var ( --mod-swatch-slash-icon-color , var ( -- spectrum-swatch-slash-icon-color)) );
176
169
}
177
170
}
178
171
@@ -274,7 +267,7 @@ governing permissions and limitations under the License.
274
267
linear-gradient (-45deg , var (--spectrum-swatch-checkerboard-dark-color ) 25.5% , transparent 25.5% ),
275
268
linear-gradient (45deg , var (--spectrum-swatch-checkerboard-dark-color ) 25.5% , transparent 25.5% );
276
269
277
- /* Swatch fill - default */
270
+ /* Swatch fill: Default */
278
271
& : before {
279
272
content : '' ;
280
273
position : absolute;
@@ -294,7 +287,7 @@ governing permissions and limitations under the License.
294
287
.spectrum-Swatch--lightBorder {
295
288
.spectrum-Swatch-fill {
296
289
& : before {
297
- box-shadow : inset 0 0 0 var (--mod-swatch-border-thickness , var (--spectrum-swatch-border-thickness )) var (--highcontrast-swatch-border-color-light , var (--mod-swatch-border-color-light , var (--spectrum-swatch-border-color-light )));
290
+ box-shadow : inset 0 0 0 var (--mod-swatch-border-thickness , var (--spectrum-swatch-border-thickness )) var (--highcontrast-swatch-border-color , var (--mod-swatch-border-color-light , var (--spectrum-swatch-border-color-light )));
298
291
}
299
292
}
300
293
}
@@ -304,6 +297,7 @@ governing permissions and limitations under the License.
304
297
.spectrum-Swatch-fill {
305
298
& : before {
306
299
box-shadow : none;
300
+ background-color : var (--highcontrast-swatch-fill-foreground-color , inherit);
307
301
}
308
302
}
309
303
}
0 commit comments