website/assets/sass/bourbon/functions/_is-length.scss

8 lines
257 B
SCSS
Raw Normal View History

2015-08-30 12:34:43 -04:00
// Check for a valid length
@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))));
}