hivedav-website

Website for HiveDAV
git clone https://git.in0rdr.ch/hivedav-website.git
Log | Files | Refs | Pull requests |Archive | README | LICENSE

_contains.scss (483B)


      1 @charset "UTF-8";
      2 
      3 /// Checks if a list contains a value(s).
      4 ///
      5 /// @access private
      6 ///
      7 /// @param {List} $list
      8 ///   The list to check against.
      9 ///
     10 /// @param {List} $values
     11 ///   A single value or list of values to check for.
     12 ///
     13 /// @example scss - Usage
     14 ///   contains($list, $value)
     15 ///
     16 /// @return {Bool}
     17 
     18 @function contains($list, $values...) {
     19   @each $value in $values {
     20     @if type-of(index($list, $value)) != "number" {
     21       @return false;
     22     }
     23   }
     24 
     25   @return true;
     26 }