diff --git a/change/@fluentui-web-components-46c9b695-18dc-4cad-a957-29ebaf4b1645.json b/change/@fluentui-web-components-46c9b695-18dc-4cad-a957-29ebaf4b1645.json new file mode 100644 index 0000000000000..0c1297bc8ba0d --- /dev/null +++ b/change/@fluentui-web-components-46c9b695-18dc-4cad-a957-29ebaf4b1645.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "fix: add primary button state and improved button disabled state in forced-colors mode", + "packageName": "@fluentui/web-components", + "email": "rupertdavid@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/src/button/button.styles.ts b/packages/web-components/src/button/button.styles.ts index d3190dbaa7302..24068d57f521c 100644 --- a/packages/web-components/src/button/button.styles.ts +++ b/packages/web-components/src/button/button.styles.ts @@ -317,12 +317,24 @@ export const styles = css` `.withBehaviors( forcedColorsStylesheetBehavior(css` :host { - background: ButtonFace; + background-color: ButtonFace; color: ButtonText; } :host(:is(:hover, :focus-visible)) { - border-color: Highlight; + border-color: Highlight !important; + } + + :host(${primaryState}:not(:is(:hover, :focus-visible))) { + background-color: Highlight; + color: HighlightText; + forced-color-adjust: none; + } + + :host(:is(:disabled, [disabled-focusable], [appearance]:disabled, [appearance][disabled-focusable])) { + background-color: ButtonFace; + color: GrayText; + border-color: ButtonText; } `), );