Hey nerds

Is there a way to convert this sass function so it can handle both a single and multiple properties?

@function pxToRem($pxValue) {
    @return math.div($pxValue, 16px) * 1rem;
}

When I use it I call it like so:

@Include mixin.spacing('margin', 10px);

Which converts any px input to rem, no problem, but it's a pain if I want to write out

@Include mixin.spacing('margin', 10px 20px 0 10px);

Or similar, trying to work out if I can do everything in a single function.

#SASS #SCSS #CSS #FrontEnd #FE #WebDev #FediHelp #FrontEndDevelopment #TechFediHelp