sass also allows you to define a function (so you can use, for example, the w / min width, as well as the width, or as part of another subexpression):
@function flex-width($target, $context) { @return (($target/$context)*100%); } #leftcol { width: flex-width(640, 980); }
source share