p0c-website

Proof of concepts for fun and profit
git clone https://git.in0rdr.ch/p0c-website.git
Log | Files | Refs | Pull requests | README | LICENSE

_is-length.scss (314B)


      1 @charset "UTF-8";
      2 
      3 /// Checks for a valid CSS length.
      4 ///
      5 /// @param {String} $value
      6 
      7 @function is-length($value) {
      8   @return type-of($value) != "null" and (str-slice($value + "", 1, 4) == "calc"
      9        or index(auto inherit initial 0, $value)
     10        or (type-of($value) == "number" and not(unitless($value))));
     11 }