Experimental book page layout.
[wolnelektury.git] / src / wolnelektury / static / 2021 / css / utils / bourbon / validators / _is-length.scss
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 (file)
index 0000000..aec94cf
--- /dev/null
@@ -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))));
+}