Perspective Designer shows error if CSS variables used as colors

I thought it would be a good idea to utilize some of the CSS variables to set some of my background colors. I wanted my project to remain consistent with the selected theme.

I’m using nighlty 8.0.14 (b2020051802) which includes the theme update.

For example, I’ve set a background colors in a menu tree to a variable value:
backgroundColor : var(--neutral-30)
which works great but the designer doesn’t like it

I think it would be great if the designer recognized the variables as a valid format.

You can also change the property name to background and the error will go away, however I do agree that you should be able to use that in backgroundColor!

1 Like

It’s just --variable. No need to wrap it in var().

1 Like

What a genius idea! Its almost like you made the thing :thinking:

Just tested it in the same nightly and it worked great, not sure where I also had the idea that var() was needed?

Even Better! Thank you

1 Like

No worries. I can tell you that I’ve made the same mistake before as well.

1 Like