// Jacket function
// Takes a list of jacket contexts.
// Outputs a value if a context is set.
@function jacket($value, $contexts...) {

  @each $item in $jacket {
    @each $context in $contexts {
      @if index($context, nth($item, 1)) {
        // If the weather is right, return the value!
        @return $value;
      }
    }
  }

  // Else return null. If null is the only value for a selector, the selector
  // will not be printed.
  @return null;
}

// Jacket Context function
// Takes a jacket context value. Use when code inside a jacket
// needs to know if a specific jacket context is set.
@function jacket-context($context) {
  @return if(index($jckt-context, $context), true, false);
}
