Skip to content

Commit

Permalink
ensure card has good default foreground text (#19439)
Browse files Browse the repository at this point in the history
* ensensure card foreground color responds to fill color changes

* Change files
  • Loading branch information
chrisdholt authored Aug 18, 2021
1 parent 25e2465 commit 22316c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "ensure card foreground color responds to fill color changes",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
3 changes: 2 additions & 1 deletion packages/web-components/src/card/card.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@microsoft/fast-foundation';
import { SystemColors } from '@microsoft/fast-web-utilities';
import { elevation } from '../styles';
import { fillColor, layerCornerRadius } from '../design-tokens';
import { fillColor, layerCornerRadius, neutralForegroundRest } from '../design-tokens';

export const cardStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles =
(context: ElementDefinitionContext, definition: FoundationElementDefinition) =>
Expand All @@ -20,6 +20,7 @@ export const cardStyles: (context: ElementDefinitionContext, definition: Foundat
width: var(--card-width, 100%);
box-sizing: border-box;
background: ${fillColor};
color: ${neutralForegroundRest}
border-radius: calc(${layerCornerRadius} * 1px);
${elevation}
}
Expand Down

0 comments on commit 22316c6

Please sign in to comment.