Skip to content

Commit

Permalink
Add CSS variable for default color
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Dec 13, 2022
1 parent 26d7b0c commit 7b430b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const presetMushroom: ButtonConfig = {
"box-sizing": "border-box",
transition: "background-color 280ms ease-in-out 0s",
"--pbs-button-rgb-color": "var(--rgb-primary-text-color)",
"--pbs-button-rgb-default-color": "var(--rgb-primary-text-color)",
"--pbs-button-rgb-active-color": "var(--pbs-button-rgb-state-color)",
"--pbs-button-rgb-bg-color": "var(--pbs-button-rgb-color)",
"--pbs-button-rgb-bg-active-color": "var(--pbs-button-rgb-active-color)",
Expand Down
10 changes: 8 additions & 2 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ paper-button {
rgb(
var(
--pbs-button-rgb-color,
var(--pbs-button-rgb-state-color, var(--rgb-state-default-color))
var(
--pbs-button-rgb-state-color,
var(--pbs-button-rgb-default-color, var(--rgb-state-default-color))
)
)
)
);
Expand Down Expand Up @@ -54,7 +57,10 @@ ha-icon {
rgb(
var(
--pbs-button-rgb-active-color,
var(--pbs-button-rgb-state-color, var(--rgb-state-default-color))
var(
--pbs-button-rgb-state-color,
var(--pbs-button-rgb-default-color, var(--rgb-state-default-color))
)
)
)
)
Expand Down

0 comments on commit 7b430b9

Please sign in to comment.