diff --git a/change/@fluentui-react-toolbar-8bb342b8-9cdc-4d1c-83e9-718c59bf4ef9.json b/change/@fluentui-react-toolbar-8bb342b8-9cdc-4d1c-83e9-718c59bf4ef9.json new file mode 100644 index 0000000000000..955625234df09 --- /dev/null +++ b/change/@fluentui-react-toolbar-8bb342b8-9cdc-4d1c-83e9-718c59bf4ef9.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "fix: use contrasting token pairs for selected radio and toggle states", + "packageName": "@fluentui/react-toolbar", + "email": "sarah.higley@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-toolbar/library/src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.ts b/packages/react-components/react-toolbar/library/src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.ts index 0a56b1fbbf73a..e02d08ae16cc4 100644 --- a/packages/react-components/react-toolbar/library/src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.ts +++ b/packages/react-components/react-toolbar/library/src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.ts @@ -4,8 +4,14 @@ import { useToggleButtonStyles_unstable } from '@fluentui/react-button'; import { ToolbarRadioButtonState } from './ToolbarRadioButton.types'; const useBaseStyles = makeStyles({ + /* use subtle ToggleButton selected styles for Toolbar Radio selected state */ selected: { - color: tokens.colorBrandForeground1, + backgroundColor: tokens.colorSubtleBackgroundSelected, + color: tokens.colorNeutralForeground2Selected, + }, + + iconSelected: { + color: tokens.colorNeutralForeground2BrandSelected, }, }); @@ -20,5 +26,9 @@ export const useToolbarRadioButtonStyles_unstable = (state: ToolbarRadioButtonSt state.root.className = mergeClasses(state.root.className, state.checked && toggleButtonStyles.selected); + if (state.icon) { + state.icon.className = mergeClasses(state.icon.className, state.checked && toggleButtonStyles.iconSelected); + } + return state; }; diff --git a/packages/react-components/react-toolbar/library/src/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.ts b/packages/react-components/react-toolbar/library/src/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.ts index d065d5e8a8a57..99096952554b6 100644 --- a/packages/react-components/react-toolbar/library/src/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.ts +++ b/packages/react-components/react-toolbar/library/src/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.ts @@ -4,8 +4,14 @@ import { useToggleButtonStyles_unstable } from '@fluentui/react-button'; import { ToolbarToggleButtonState } from './ToolbarToggleButton.types'; const useBaseStyles = makeStyles({ + /* use subtle ToggleButton selected styles for Toolbar Radio selected state */ selected: { - color: tokens.colorBrandForeground1, + backgroundColor: tokens.colorSubtleBackgroundSelected, + color: tokens.colorNeutralForeground2Selected, + }, + + iconSelected: { + color: tokens.colorNeutralForeground2BrandSelected, }, }); @@ -20,5 +26,9 @@ export const useToolbarToggleButtonStyles_unstable = (state: ToolbarToggleButton state.root.className = mergeClasses(state.root.className, state.checked && toggleButtonStyles.selected); + if (state.icon) { + state.icon.className = mergeClasses(state.icon.className, state.checked && toggleButtonStyles.iconSelected); + } + return state; };