Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add force-colors to backgroundStyles and update button styles to fix the card and button components #17231

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "add force-colors backgroundStyles and set a few HC colors on button styles",
"packageName": "@fluentui/web-components",
"email": "khamu@microsoft.com",
"dependentChangeType": "patch"
}
16 changes: 14 additions & 2 deletions packages/web-components/src/design-system-provider/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { attr, css, nullableNumberConverter } from '@microsoft/fast-element';
import { Direction } from '@microsoft/fast-web-utilities';
import { Direction, SystemColors } from '@microsoft/fast-web-utilities';
import {
CSSCustomPropertyBehavior,
designSystemProperty,
DesignSystemProvider,
designSystemProvider,
forcedColorsStylesheetBehavior,
DesignSystemProviderTemplate as template,
} from '@microsoft/fast-foundation';
import { parseColorHexRGB } from '@microsoft/fast-colors';
Expand All @@ -23,7 +24,18 @@ const backgroundStyles = css`
background-color: var(--background-color);
color: ${color.var};
}
`.withBehaviors(color);
`.withBehaviors(
color,
forcedColorsStylesheetBehavior(
css`
:host {
background-color: ${SystemColors.ButtonFace};
box-shadow: 0 0 0 1px ${SystemColors.CanvasText};
color: ${SystemColors.ButtonText};
}
`,
),
);

/**
* The Fluent DesignSystemProvider Element. Implements {@link @microsoft/fast-foundation#DesignSystemProvider},
Expand Down
Loading