Hi @Overthane
Here you have an example of what you want to do: https://codepen.io/nicofonseca/pen/ae4d38d4fb3db8526a15111df7cea562
In order to improve animations with CSS variables, I recommend you to use the variables inside the scope of the element you want to animate and not global variables, because they can bring some performance issues.
Also, on the CSS you can use calc(var(my-variable) * 1px) or calc(var(my-variable) * 1deg) or whatever you want to animate.
Lastly, if possible it is better to animate transform (rotate, scale, y, x) properties instead or width/height.
Hope this helps!
Cheers,
Nico.