From c5139543fda6248570fd82338d0be94069d73717 Mon Sep 17 00:00:00 2001 From: megumiimai Date: Wed, 16 Sep 2026 08:00:17 +0900 Subject: [PATCH] fix(web-components): keep switch indicator visible in forced-colors mode --- ...eb-components-8f3c2a1d-5e6b-4c7d-9a0e-1b2c3d4e5f60.json | 7 +++++++ packages/web-components/src/switch/switch.styles.ts | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 change/@fluentui-web-components-8f3c2a1d-5e6b-4c7d-9a0e-1b2c3d4e5f60.json diff --git a/change/@fluentui-web-components-8f3c2a1d-5e6b-4c7d-9a0e-1b2c3d4e5f60.json b/change/@fluentui-web-components-8f3c2a1d-5e6b-4c7d-9a0e-1b2c3d4e5f60.json new file mode 100644 index 0000000000000..42c9c1d715245 --- /dev/null +++ b/change/@fluentui-web-components-8f3c2a1d-5e6b-4c7d-9a0e-1b2c3d4e5f60.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix(switch): keep the indicator visible in forced-colors mode", + "packageName": "@fluentui/web-components", + "email": "jiayin.3zh@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/src/switch/switch.styles.ts b/packages/web-components/src/switch/switch.styles.ts index a6db79a77b51e..6fa33215340b5 100644 --- a/packages/web-components/src/switch/switch.styles.ts +++ b/packages/web-components/src/switch/switch.styles.ts @@ -137,12 +137,12 @@ export const styles = css` .checked-indicator, :host(:hover) .checked-indicator, :host(:active) .checked-indicator { - background-color: ActiveCaption; + background-color: CanvasText; } :host(${checkedState}) .checked-indicator, :host(${checkedState}:hover) .checked-indicator, :host(${checkedState}:active) .checked-indicator { - background-color: ButtonFace; + background-color: HighlightText; } :host(${nativeDisabledState}) .checked-indicator, :host(${checkedState}${nativeDisabledState}) .checked-indicator {