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

docs(card): customizing theme colors #1200

Merged
merged 10 commits into from
Sep 6, 2023
5 changes: 5 additions & 0 deletions .changeset/wild-apes-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rhds/elements": patch
---

`rh-card`: adding public css variable for card background color. (#1198)
brianferry marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 5 additions & 1 deletion elements/rh-card/rh-card.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ article {
var(--rh-color-border-subtle-on-light, #c7c7c7)
)
);
background-color: var(--_background-color, var(--rh-color-surface-lightest, #ffffff));
background-color:
var(
--rh-card-background-color,
var(--_background-color, var(--rh-color-surface-lightest, #ffffff))
);
border-radius: var(--_border-radius, var(--rh-border-width-lg, 3px));
color: var(--_color, var(--rh-color-text-primary-on-light, #151515));
font-family: var(--rh-font-family-body-text, RedHatText, "Red Hat Text", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans KR", "Noto Sans Malayalam", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", Helvetica, Arial, sans-serif);
Expand Down
4 changes: 3 additions & 1 deletion elements/rh-card/rh-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import styles from './rh-card.css';
* @cssprop {<length>} --rh-card-header-font-size
* Font size for header on card
* {@default `1.5rem`}
*
* @cssprop {<color>} --rh-card-background-color
* Background color for card
* {@default `#ffffff`}
*/
@customElement('rh-card')
export class RhCard extends LitElement {
Expand Down