summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/bourbon/app/assets/stylesheets/functions/_contains.scss
blob: 4db1eaf080d1c4a3ab18e7b6e3e6183ed338212d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@charset "UTF-8";

/// Checks if a list contains a value(s).
///
/// @access private
///
/// @param {List} $list
///   The list to check against.
///
/// @param {List} $values
///   A single value or list of values to check for.
///
/// @example scss - Usage
///   contains($list, $value)
///
/// @return {Bool}

@function contains($list, $values...) {
  @if $output-bourbon-deprecation-warnings == true {
    @warn "[Bourbon] [Deprecation] `contains` is deprecated and will be " +
    "removed in 5.0.0.";
  }

  @each $value in $values {
    @if type-of(index($list, $value)) != "number" {
      @return false;
    }
  }

  @return true;
}