Skip to content

Commit d48f630

Browse files
committed
[fix] ProgressBar & Switch for High Contrast mode
Prevent these controls from becoming invisible in Windows High Contrast mode by disabling forced color adjustment for these elements. Fix #1606
1 parent 2a930b7 commit d48f630

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/react-native-web/src/exports/ProgressBar/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@ ProgressBar.displayName = 'ProgressBar';
7171

7272
const styles = StyleSheet.create({
7373
track: {
74+
forcedColorAdjust: 'none',
7475
height: 5,
7576
overflow: 'hidden',
7677
userSelect: 'none',
7778
zIndex: 0
7879
},
7980
progress: {
81+
forcedColorAdjust: 'none',
8082
height: '100%',
8183
zIndex: -1
8284
},

packages/react-native-web/src/exports/Switch/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,15 @@ const styles = StyleSheet.create({
145145
cursor: 'inherit'
146146
},
147147
track: {
148+
forcedColorAdjust: 'none',
148149
...StyleSheet.absoluteFillObject,
149150
height: '70%',
150151
margin: 'auto',
151152
transitionDuration: '0.1s',
152153
width: '100%'
153154
},
154155
thumb: {
156+
forcedColorAdjust: 'none',
155157
alignSelf: 'flex-start',
156158
borderRadius: '100%',
157159
boxShadow: thumbDefaultBoxShadow,

0 commit comments

Comments
 (0)