-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat(card): Add component tokens #8605
feat(card): Add component tokens #8605
Conversation
* @prop --calcite-card-border-color: Specifies the border color of the component. | ||
* @prop --calcite-card-box-shadow: Specifies the box shadow of the component. | ||
* @prop --calcite-card-corner-radius: Specifies the corner radius of the component. | ||
* @prop --calcite-card-subtitle-color: Specifies the color of the component's `"subtitle"` slot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Places we accept both a prop and a slot, it could make sense to have this. I could also see card having props in the future for title / subtitle, keeping the slot for more advanced cases, so maybe these are fine to leave.
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Let's just remove the tokens for slotted content and allow those elements to style themselves.
* @prop --calcite-card-border-color: Specifies the border color of the component. | ||
* @prop --calcite-card-box-shadow: Specifies the box shadow of the component. | ||
* @prop --calcite-card-corner-radius: Specifies the corner radius of the component. | ||
* @prop --calcite-card-subtitle-color: Specifies the color of the component's `"subtitle"` slot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not create tokens for slotted elements.
@alisonailea could you give this one another check after the last updates? Thanks! |
Looks good! |
**Related Issue:** #7180 ## Summary Adds the following public component css properties: `--calcite-card-background-color`: Specifies the background color of the component. `--calcite-card-border-color`: Specifies the border color of the component. `--calcite-card-box-shadow`: Specifies the box shadow of the component. `--calcite-card-corner-radius`: Specifies the corner radius of the component. Adds a Chromatic test and a demo page example. Also replaces broken image links in local demo.
Related Issue: #7180
Summary
Adds the following public component css properties:
--calcite-card-background-color
: Specifies the background color of the component.--calcite-card-border-color
: Specifies the border color of the component.--calcite-card-box-shadow
: Specifies the box shadow of the component.--calcite-card-corner-radius
: Specifies the corner radius of the component.Adds a Chromatic test and a demo page example. Also replaces broken image links in local demo.