Odd behavior with Style Class on button

HI all. I’m trying to use a style class on a button. In particular, trying to use --qual-2 for the background color. When I do, it goes transparent. This happens for anything with a -number on the end, e.g. --neutral-10. If I use any color that DOESN'T have a -number on the end, it works, e.g. --success or --info work fine. If I use direct styling, any color works fine. Am I doing something wrong? Thanks.

Hey,

You have to surround your text with var()

If that doesn’t work, make sure the css variable --qual-2 really exists.

That worked! Thanks.

Well, I spoke too soon. It works for the -number, but doesn't work for --word, e.g.
var(--callToAction--disabled). Oddly, it seems to go to the default color, rather than transparent.

Hmmm

Really interesting. Just had a go at it and this is what I observe:

When directly specifying var(--callToAction--disabled) in the style properties of an element, it works:

But when specifying a class where the background color is set to var(--callToAction--disabled), it is automatically interpreted as var(--callToActio-var(n--disabled))

This is maybe a bug on Ignition side ?

EDIT : Whilst I think it’s a bug, there is a workaround !! Specify var(--callToAction\-\-disabled) in your style, note the \

1 Like

Thanks again!