// Check for a valid length @function is-length($value) { @return contains(0 "auto" "initial" "inherit", $value) or type-of($value) == "number" and not unitless($value) or str-slice($value + "", 1, 4) == "calc"; }