[FluentCard] Add MinimalStyle property #1595
Merged
+84
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[FluentCard] Add MinimalStyle property
By default the FluentCard component is a visual container and design system provider. Cards are snapshots of content that are typically used in a group to present collections of related information. Thus, by design, the FluentCard component includes all the styles required for a good representation of the other components included in it. This adds a large number of styles such as
justify-content; align-items; gap; width;
and over 80 CSS variables. The code generated can therefore become very important, especially if you use this component several times, for example in a list or during a foreach.To avoid this, you can use the MinimalStyle property. This will remove all the default styles from the FluentCard component. This will allow you to use the FluentCard component as a simple container without any style, except the styles to draw the box-shadow (and some minimal styles).
Example
Code generated
Default
FluentCard
code generated