CSS Gradient in Perspective Style not working

I’m using CSS Gradients in Perspective 8.0.16. If I use them as an inline style on an object they are working. If I put them in a style they do not work.

Is this a bug or am I doing something wrong. Here’s an example gradient I’m using.

linear-gradient(0deg, rgb(128,0,0) 0%, rgb(200,0,0) 8%, rgb(255,200,200) 50%, rgb(200,0,0) 92%, rgb(128,0,0)

You supplied this:

linear-gradient(0deg, rgb(128,0,0) 0%, rgb(200,0,0) 8%, rgb(255,200,200) 50%, rgb(200,0,0) 92%, rgb(128,0,0)

But try this (you’re missing a closing paren at the end):

linear-gradient(0deg, rgb(128,0,0) 0%, rgb(200,0,0) 8%, rgb(255,200,200) 50%, rgb(200,0,0) 92%, rgb(128,0,0))

Adding the paren got it working for me.

Thank you! It was a copy/paste error from my test environment to my style. I found a bug though.

I made this same mistake on several classes. If you are missing a parenthesis in one of your styles it breaks other styles. I think it only breaks styles downstream from the one you are missing a parenthesis on.

I put the parenthesis on one of the styles that was missing it and it didn’t fix the problem. Then I went through all of them and the style started working as soon as I fixed the one upstream from the one I had bound to a control.

Thanks again for your help.

It’s not a bug - that’s just how CSS works.

2 Likes