I am trying to do the following:
on page level I define stylesheets
stylesheet: |
.csslabel {
font-size: var(--my-font-size);
font-weight: 500;
height: var(--my-font-size);
user-select: none;
-webkit-user-select: none;}
.csslabelinactive {
color: var(--my-font-color);}
.csslabelactive {
color: var(--my-font-color-active);}
on widget level THIS is working:
...
class: '=(items[props.item].state == "OFF") ? "csslabelinactive" : "csslabelactive"'
...
but THIS is not working
...
class:
- csslabel
- '=(items[props.item].state == "OFF") ? "csslabelinactive" : "csslabelactive"'
...
the resulting code is:
<div class="csslabel =(items[props.item].state == "OFF") ? "csslabelinactive" : "csslabelactive"'></div>
I do probably s.th. wrong with quotes. does anybody have a clue?