I've been working with the rule below:
margin-left: calc(((100vw - 624px) / 144) * 5);
At a viewport width of 1200px, this translates to 20px. However, I would prefer to have a result of 20%. To achieve this, it would be ideal to change the integer multiplication factor '5' into '5%'. This modification requires removing units from the other parts of the equation so that calc processes 4 * 5%
instead of 4px * 5
.
In SASS, dividing by 1px is an option, whereas in calc division can only be done with numbers, not unit values.
Is there a method for eliminating units from a segment of a calc function?