Im on OH 3.4 and have an issue with the backgroung color of an expandable card.
i followed this post
In the widget editor the code works as expected but in the browser not.
Here is my widget code.
uid: muell_neu
tags: []
props:
parameters: []
parameterGroups: []
timestamp: Dec 27, 2022, 8:55:20 AM
component: f7-card
config:
backdrop: true
border-radius: var(--f7-card-expandable-border-radius)
expandable: true
style:
--f7-card-expandable-box-shadow: 0px 5px 4px rgba(0, 0, 0, 0.5)
--f7-card-expandable-margin-horizontal: 5px
--f7-card-expandable-margin-vertical: 7px
--f7-card-expandable-tablet-border-radius: 0px
--moz-user-select: none
--ms-user-select: none
--webkit-user-select: none
--blink-color1: white
--blink-color2: '=(items.Muellkalender_Ergebnistitel1.state === "Papier") ? "linear-gradient(to left,#FFFFFF 0%, #EE2C2C 100%)" : (items.Muellkalender_Ergebnistitel1.state) === "Restmuell" ? "linear-gradient(to left,#FFFFFF 0%, #797979 100%)" : (items.Muellkalender_Ergebnistitel1.state) === "GelberSack" ? "linear-gradient(to left,#FFFFFF 0%, #FFD700 100%)" : (items.Muellkalender_Ergebnistitel1.state) === "BaierBio" ? "linear-gradient(to left,#FFFFFF 0%,#CD661D 100%)" : "white"'
height: 54px
width: auto
stylesheet: >
.myDIV {
animation: mymove 1s infinite;
} @keyframes mymove {
from {background: var(--blink-color1);}
to {background: var(--blink-color2);}
} .myDIVnormal {
background: var(--blink-color2)
}
class:
- card-expandable-animate-width
swipeToClose: true
slots:
default:
- component: f7-card-content
config:
style:
width: 100%
class: '=(dayjs(items.Muellkalender_Ergebnisstart1.state).diff(dayjs().startOf("day"), "days")) == 1 ? "myDIV" : "myDIVnormal" '
slots:
default:
- component: oh-button
config:
class:
- card-opened-fade-in
- cell-close-button
- card-close
color: black
iconF7: xmark_circle
iconSize: 30px
style:
padding-bottom: 35px
padding-top: 14px
position: absolute
right: 0
top: 0
z-index: 999
- component: f7-block
config:
class:
- no-padding
style:
height: 200px
margin: 0px
slots:
default:
- component: f7-row
config:
class:
- display-flex
- justify-content-space-between
slots:
default:
- component: f7-col
config:
class:
- display-flex
width: "10"
slots:
default:
- component: f7-icon
config:
f7: trash
size: 25px
- component: f7-col
config:
class:
- display-flex
width: "40"
slots:
default:
- component: Label
config:
text: =items.Muellkalender_Ergebnistitel1.state
- component: f7-col
config:
class:
- display-flex
width: "50"
slots:
default:
- component: Label
config:
text: =items.Muellkalender_Ergebnisstart1.displayState
In the widget editor i get this result
in the browser i get this result
any help appreciated