Add functions to calculate ranges to _functions.scss