How do you strip the unit from any number in SASS?
I know you can strip units from numbers in SASS when you know the unit before-hand like this: $number: 16px; $without-unit: 16px / 1px; @warn $without-unit; // 16 But is it possible to strip the unit from a number without knowing what the unit is first? @function strip-unit($number) { // magic code here... } @warn strip-unit(16px); // 16 -- UPDATE: You should never actually need to use this function. Sass math is very smart about units, and I have never seen a use-case in which stripping units was a better option than simply using correct math to get what you need. See the Sass issue thread