I am able to achieve it with using % with my value and works on different screen sizes.
You could also use a calc function within your variable for spacing and get the same result.