Skip to content

Commit 29da778

Browse files
committed
feat(HCM): update first half of components
1 parent b15c103 commit 29da778

File tree

4 files changed

+29
-35
lines changed

4 files changed

+29
-35
lines changed

packages/components/src/components/file-uploader/_file-uploader.scss

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@
160160
text-overflow: ellipsis;
161161
white-space: nowrap;
162162
}
163-
164-
// Windows, Firefox HCM Fix
165-
@media screen and (-ms-high-contrast: active),
166-
screen and (prefers-contrast) {
167-
outline: 2px solid transparent;
168-
}
169163
}
170164

171165
.#{$prefix}--file__selected-file--field {
@@ -307,13 +301,6 @@
307301

308302
.#{$prefix}--file__state-container .#{$prefix}--file-close svg path {
309303
fill: $icon-primary;
310-
311-
// Windows, Firefox HCM Fix
312-
@media screen and (-ms-high-contrast: active),
313-
screen and (prefers-contrast) {
314-
// `ButtonText` is a CSS2 system color to help improve colors in HCM
315-
fill: ButtonText;
316-
}
317304
}
318305

319306
.#{$prefix}--file__state-container .#{$prefix}--inline-loading__animation {
@@ -335,6 +322,17 @@
335322
outline: 2px solid $focus;
336323
outline-offset: -2px;
337324
}
325+
326+
// Windows HCM fix
327+
/* stylelint-disable */
328+
.#{$prefix}--file__selected-file {
329+
@include high-contrast-mode('outline');
330+
}
331+
332+
.#{$prefix}--file__state-container .#{$prefix}--file-close svg path {
333+
@include high-contrast-mode('icon-fill');
334+
}
335+
/* stylelint-enable */
338336
}
339337

340338
@include exports('file-uploader') {

packages/components/src/components/modal/_modal.scss

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,6 @@
324324
align-items: flex-start;
325325
}
326326

327-
.#{$prefix}--modal-footer button.#{$prefix}--btn:focus {
328-
// Firefox HCM Fix
329-
@media screen and (prefers-contrast) {
330-
border: none;
331-
outline-style: dotted;
332-
}
333-
}
334-
335327
.#{$prefix}--modal-close {
336328
position: absolute;
337329
top: 0;
@@ -352,11 +344,6 @@
352344
&:focus {
353345
border-color: $focus;
354346
outline: none;
355-
356-
// Firefox HCM Fix
357-
@media screen and (prefers-contrast) {
358-
border-style: dotted;
359-
}
360347
}
361348
}
362349

@@ -368,13 +355,6 @@
368355
width: rem(20px);
369356
height: rem(20px);
370357
fill: $icon-primary;
371-
372-
// Windows, Firefox HCM Fix
373-
@media screen and (-ms-high-contrast: active),
374-
screen and (prefers-contrast) {
375-
// `ButtonText` is a CSS2 system color to help improve colors in HCM
376-
fill: ButtonText;
377-
}
378358
}
379359

380360
.#{$prefix}--body--with-modal-open {
@@ -384,6 +364,17 @@
384364
.#{$prefix}--body--with-modal-open .#{$prefix}--tooltip {
385365
z-index: z('modal');
386366
}
367+
368+
// Windows HCM fixes
369+
/* stylelint-disable */
370+
.#{$prefix}--modal-close__icon {
371+
@include high-contrast-mode('icon-fill');
372+
}
373+
374+
.#{$prefix}--modal-close:focus {
375+
@include high-contrast-mode('focus');
376+
}
377+
/* stylelint-enable */
387378
}
388379

389380
@include exports('modal') {

packages/components/src/components/notification/_inline-notification.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,17 @@
301301
fill: $icon-primary;
302302
}
303303

304+
// Windows HCM fixes
304305
/* stylelint-disable */
305306
.#{$prefix}--inline-notification {
306307
@include high-contrast-mode('outline');
307308
}
308-
.#{$prefix}--inline-notification__close-button {
309+
310+
.#{$prefix}--inline-notification__close-button:focus,
311+
.#{$prefix}--btn.#{$prefix}--btn--ghost.#{$prefix}--inline-notification__action-button:focus {
309312
@include high-contrast-mode('focus');
310313
}
314+
311315
.#{$prefix}--inline-notification__icon {
312316
@include high-contrast-mode('icon-fill');
313317
}

packages/components/src/components/notification/_toast-notification.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,12 @@
221221
color: $text-primary;
222222
}
223223

224+
// Windows HCM fixes
224225
/* stylelint-disable */
225226
.#{$prefix}--toast-notification {
226227
@include high-contrast-mode('outline');
227228
}
228-
.#{$prefix}--toast-notification__close-button {
229+
.#{$prefix}--toast-notification__close-button:focus {
229230
@include high-contrast-mode('focus');
230231
}
231232
.#{$prefix}--toast-notification__icon {

0 commit comments

Comments
 (0)