@charset 'UTF-8';

////
/// Flavor SCSS Mixins Common Flex-Grid properties
/// @group mixins-flex-grid
/// @author blackmirror1980
////

/// Align Content modes supported
///
/// @access private
/// @type list
$align-content-modes: array-concat((normal, stretch, center, flex-start, flex-end, space-between, space-around, space-evenly), $css-default-modes);

/// Checks if something is a support align-content mode (normal, stretch, center, flex-start, flex-end, space-between, space-around, space-evenly, inherit, initial)
///
/// @link https://www.w3schools.com/cssref/css3_pr_align-content.asp W3Schools align-content docs
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/align-content MDN align-content docs
/// @access public
/// @param {string} $ac - the align-content value
/// @return {boolean} - true if is align-content value
@function is-align-content($ac) {
  @return is-defined($ac) and array-contains($align-content-modes, $ac);
}

/// Align Content mixin
///
/// @example scss - Usage
///   .align-content-element {
///     @include align-content(stretch);
///   }
///
/// @example css - Output
///   .align-content-element {
///     align-content: stretch;
///   }
/// @access public
/// @param {string} $ac - the align-content mode
/// @param {boolean} $important [false] - if true, will render the important rule
@mixin align-content($ac, $important: false) {
  @if(is-align-content($ac)) {
    align-content: $ac important($important);
  }
  @else {
    @warn '`align-content: #{$ac}` is not a valid align-content mode';
  }
}
