X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6753452b63d937fd05ad485edc650565f5fa064e..24721591455e048cffca365384e6759daae05916:/src/wolnelektury/static/2021/css/utils/bourbon/validators/_is-length.scss?ds=sidebyside diff --git a/src/wolnelektury/static/2021/css/utils/bourbon/validators/_is-length.scss b/src/wolnelektury/static/2021/css/utils/bourbon/validators/_is-length.scss new file mode 100644 index 000000000..aec94cf3d --- /dev/null +++ b/src/wolnelektury/static/2021/css/utils/bourbon/validators/_is-length.scss @@ -0,0 +1,15 @@ +@charset "UTF-8"; + +/// Checks for a valid CSS length. +/// +/// @argument {string} $value +/// +/// @return {boolean} +/// +/// @access private + +@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)))); +}