Toggle color issue

#1

Hello,

I am trying to change a toggle’s background color according to its on/off state.

This doesn’t work:
:host{
–color-raised:blue;
}
.value.on{
–color-raised:red;
}

This doesn’t help neither:
.value{
–color-raised:blue;
}
.value.on{
–color-raised:red;
}

…and, yes, I’ve searched using the sidebar brought by F12! :dizzy_face:

#2

You are using a long dash character () instead of two dashes (--), and .value.on does not target the right element, this works:

:host{
--color-raised:blue;
}
:host.on{
--color-raised:red;
}
#3

Actually I have two short dashes (I’ve just checked my code) but it seems that the copy-paste process to Firefox transformed them!

But thank you anyway!