Skip to content

Commit

Permalink
prioritize --lovelace-background over --primary-background-color for …
Browse files Browse the repository at this point in the history
…background elements as HA bug causes default theme primary-background-color to overwrite theme color
  • Loading branch information
Nerwyn committed Dec 29, 2024
1 parent 2e12d27 commit 62ce265
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 11 deletions.
24 changes: 21 additions & 3 deletions dist/universal-remote-card.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "universal-remote-card",
"version": "4.3.2",
"version": "4.3.3",
"description": "Universal Remote Card",
"main": "./dist/universal-remote-card.min.js",
"scripts": {
Expand Down
21 changes: 18 additions & 3 deletions src/classes/remote-slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,13 @@ export class RemoteSlider extends BaseRemoteElement {
overflow: hidden;
height: var(--height);
align-self: center;
color: var(--background, var(--primary-background-color));
color: var(
--background,
var(
--lovelace-background,
var(--primary-background-color)
)
);
}
.background {
Expand All @@ -467,7 +473,10 @@ export class RemoteSlider extends BaseRemoteElement {
height: var(--background-height, 100%);
background: var(
--background,
var(--primary-background-color)
var(
--lovelace-background,
var(--primary-background-color)
)
);
}
Expand Down Expand Up @@ -553,7 +562,13 @@ export class RemoteSlider extends BaseRemoteElement {
.icon {
color: var(
--icon-color,
var(--background, var(--primary-background-color))
var(
--background,
var(
--lovelace-background,
var(--primary-background-color)
)
)
);
--mdc-icon-size: var(--size, 32px);
Expand Down
4 changes: 2 additions & 2 deletions src/classes/remote-touchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ export class RemoteTouchpad extends BaseRemoteElement {
width: -webkit-fill-available;
width: fill-available;
background: var(
--primary-background-color,
rgb(111, 118, 125)
--lovelace-background,
var(--primary-background-color, rgb(111, 118, 125))
);
touch-action: none;
text-align: center;
Expand Down

0 comments on commit 62ce265

Please sign in to comment.