summaryrefslogtreecommitdiff
path: root/_sass/bourbon/functions/_is-length.scss
blob: 5826e789b79c61700e699e707ed27febf08118bc (plain)
1
2
3
4
5
6
7
8
9
10
11
@charset "UTF-8";

/// Checks for a valid CSS length.
///
/// @param {String} $value

@function is-length($value) {
  @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc"
       or index(auto inherit initial 0, $value)
       or (type-of($value) == "number" and not(unitless($value))));
}