Skip to content

Commit 150f608

Browse files
author
Yosevu Kilonzo
committed
fix: update windows high contrast colors
1 parent 055318e commit 150f608

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

components/swatch/index.css

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ governing permissions and limitations under the License.
3131
--spectrum-swatch-focus-ring-gap: var(--spectrum-focus-ring-gap);
3232

3333
--spectrum-swatch-border-color: var(--spectrum-swatch-border-color);
34-
/* --spectrum-swatch-border-color-selected: var(--spectrum-gray-900); */
3534
--spectrum-swatch-inner-border-color-selected: var(--spectrum-gray-50);
3635
--spectrum-swatch-disabled-icon-border-color: var(--spectrum-swatch-disabled-icon-border-color);
3736
--spectrum-swatch-disabled-icon-color: var(--spectrum-white);
@@ -72,12 +71,11 @@ governing permissions and limitations under the License.
7271
}
7372
.spectrum-Swatch {
7473
--highcontrast-swatch-disabled-icon-color: grayText;
75-
--highcontrast-swatch-focus-ring-color: ButtonText;
74+
--highcontrast-swatch-focus-ring-color: Highlight;
7675
--highcontrast-swatch-border-color-selected: Highlight;
7776
--highcontrast-swatch-border-color: ButtonText;
78-
--highcontrast-swatch-border-color-light: ButtonText;
79-
/* --highcontrast-swatch-fill-background-color-selected: ButtonFace; */
8077
--highcontrast-swatch-fill-background-color: ButtonFace;
78+
--highcontrast-swatch-fill-foreground-color: ButtonText;
8179
&.is-disabled {
8280
.spectrum-Swatch-fill {
8381
forced-color-adjust: auto;
@@ -141,7 +139,7 @@ governing permissions and limitations under the License.
141139
}
142140
}
143141

144-
/* Swatch fill with transparent background-color for images, gradients, and svgs */
142+
/* Swatch fill: Image, Gradient, SVG */
145143
&.is-image {
146144
.spectrum-Swatch-fill {
147145
&::before {
@@ -161,18 +159,18 @@ governing permissions and limitations under the License.
161159
}
162160
}
163161

162+
/* Swatch fill: Not fill with Slash */
164163
&.is-nothing {
165164
.spectrum-Swatch-fill {
166165
background-color: var(--highcontrast-swatch-fill-background-color, var(--mod-swatch-fill-background-color, var(--spectrum-swatch-fill-background-color)));
167166

168-
/* Slash */
169167
&:after {
170168
height: var(--mod-swatch-slash-thickness, var(--spectrum-swatch-slash-thickness));
171169
content: '';
172170
position: absolute;
173171
transform: rotate(-45deg);
174172
width: 200%; /* just needs to be bigger than a swatch */
175-
background: var(--spectrum-swatch-slash-icon-color);
173+
background: var(--highcontrast-swatch-fill-foreground-color, var(--mod-swatch-slash-icon-color, var(--spectrum-swatch-slash-icon-color)));
176174
}
177175
}
178176

@@ -274,7 +272,7 @@ governing permissions and limitations under the License.
274272
linear-gradient(-45deg, var(--spectrum-swatch-checkerboard-dark-color) 25.5%, transparent 25.5%),
275273
linear-gradient(45deg, var(--spectrum-swatch-checkerboard-dark-color) 25.5%, transparent 25.5%);
276274

277-
/* Swatch fill - default */
275+
/* Swatch fill: Default */
278276
&:before {
279277
content: '';
280278
position: absolute;
@@ -294,7 +292,7 @@ governing permissions and limitations under the License.
294292
.spectrum-Swatch--lightBorder {
295293
.spectrum-Swatch-fill {
296294
&: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)));
295+
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)));
298296
}
299297
}
300298
}
@@ -304,6 +302,7 @@ governing permissions and limitations under the License.
304302
.spectrum-Swatch-fill {
305303
&:before {
306304
box-shadow: none;
305+
background-color: var(--highcontrast-swatch-fill-foreground-color, inherit);
307306
}
308307
}
309308
}

0 commit comments

Comments
 (0)