Skip to content

Commit 592b73f

Browse files
Carousel: High contrast Windows (#33411)
1 parent b06d337 commit 592b73f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: Ensure a viable background color for nav items in high contrast windows",
4+
"packageName": "@fluentui/react-carousel",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-carousel/library/src/components/CarouselNavButton/useCarouselNavButtonStyles.styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ const useStyles = makeStyles({
3131
width: tokens.spacingHorizontalS,
3232
backgroundColor: tokens.colorNeutralForeground1,
3333
color: tokens.colorNeutralForeground1,
34+
'@media (forced-colors: active)': {
35+
// Bypass OS high contrast with inverted blend mode (otherwise icon is invisible)
36+
forcedColorAdjust: 'none',
37+
backgroundColor: 'white',
38+
mixBlendMode: 'difference',
39+
},
3440
},
3541
},
3642
rootUnselected: {

0 commit comments

Comments
 (0)