3 /// Checks for a valid CSS length.
5 /// @argument {string} $value
11 @function _is-length($value) {
12 @return type-of($value) != "null"
14 str-slice($value + "", 1, 4) == "calc"
15 or str-slice($value + "", 1, 3) == "var"
16 or str-slice($value + "", 1, 3) == "env"
17 or index(auto inherit initial 0, $value)
18 or (type-of($value) == "number" and not(unitless($value)))