Setting css variables using jquery

Hello, fellow campers,
I need a little guidance understanding what I am doing wrong here.
I have made a cuboid and I am trying to change its dimensions width and height through the select dropdown. I am making uses of CSS variables for changing height and width.
The problem I am facing is If I have set let say width, And then I change the height It would not retain the width, I think the attribute value is not getting set. Same happens viceversa
Here is the codepen link: https://codepen.io/ridafatima15h1/pen/EOLbGO?editors=1010

Any guidance would be very helpful.
Thank you!

Thank you, I figured it out! :grinning: