-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds automatic card background color calculation based on parent cont…
…ext (#15126) * Feat: adds automatic card background color calculation * addressed PR comment * added spec back
- Loading branch information
Showing
4 changed files
with
107 additions
and
8 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
change/@fluentui-web-components-2020-09-18-12-06-28-users-jes-card-improvements.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "Feat: adds automatic card background color calculation", | ||
"packageName": "@fluentui/web-components", | ||
"email": "jes@microsoft.com", | ||
"dependentChangeType": "patch", | ||
"date": "2020-09-18T19:06:28.570Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
id: card | ||
title: fluent-card | ||
sidebar_label: card | ||
custom_edit_url: https://github.com/microsoft/fluentui/edit/master/packages/web-components/src/card/README.md | ||
--- | ||
|
||
The `fluent-card` component is a visual container and design system provider. By default `fluent-card` applies `neutralFillCard` to its background that is calculated from its parent design system provider. If a custom background color is desired the attribute `card-background-color` is available, this will reset the cards design system to that value. Cards are snapshots of content that are typically used in a group to present collections of related information. | ||
|
||
## Usage | ||
|
||
```html live | ||
<fast-design-system-provider use-defaults> | ||
<fast-card> | ||
<h3>Card title</h3> | ||
<p> | ||
At purus lectus quis habitant commodo, cras. Aliquam malesuada velit a tortor. Felis orci tellus netus risus et | ||
ultricies augue aliquet. | ||
</p> | ||
<fast-button>Learn more</fast-button> | ||
</fast-card> | ||
</fast-design-system-provider> | ||
|
||
<fast-design-system-provider use-defaults> | ||
<fast-card card-background-color="#FF0000"> | ||
<h3>Card title</h3> | ||
<p> | ||
At purus lectus quis habitant commodo, cras. Aliquam malesuada velit a tortor. Felis orci tellus netus risus et | ||
ultricies augue aliquet. | ||
</p> | ||
<fast-button>Learn more</fast-button> | ||
</fast-card> | ||
</fast-design-system-provider> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters