Hi so let me start by showing you how I would do this in SCSS:
$submenu-padding-left: 1.5em;
transform: translateX(calc(-#{$submenu-padding-left} + .5em));
which would compile to:
transform: translateX(calc(-1.5em - .5em))
Basically SCSS allows me to concatenate a minus symbol -
with a variable in order to convert it to a negative value.
Is it possible to achieve this with CSS Variables?
Yes you can do it. Simply multiply by
-1
: