@use '../../00-mixins/themify/themify' as *;

///
/// Apply background colors for tables
///
/// @since 3.0.0-beta10
/// @group tools
/// @access public
/// @author Helena Standaert
///
/// @param {string} $child-selector [null]
///   Selector for child elements.
///

@mixin table-backgrounds($child-selector: null) {
  &.success #{$child-selector} {
    @include theme-content('color-success-light', 'table-success-background') {
      border-color: $theme-color;
      background-color: $theme-color;
    };
  }

  &.warning #{$child-selector} {
    @include theme-content('color-warning-light', 'table-warning-background') {
      border-color: $theme-color;
      background-color: $theme-color;
    };
  }

  &.error #{$child-selector} {
    @include theme-content('color-error-light', 'table-error-background') {
      border-color: $theme-color;
      background-color: $theme-color;
    };
  }

  &.row-even #{$child-selector} {
    @include theme-content('color-secondary-light', 'table-row-color') {
      border-color: $theme-color;
      background-color: $theme-color;
    };
  }
}
