@mixin generate_tables {
  @for $i from 1 through length($all_colors) {
    .is-table.is-#{nth($all_colors, $i)} {
      color: variable(#{nth($all_colors, $i)});
      
      td,
      th {
        padding: .75rem 1rem;
        border: 1px solid variable(#{nth($all_colors, $i)});
      }
  
      th {
        background: variable(#{nth($all_colors, $i)});
        color: variable("white");
        border-left: 1px solid variable(#{nth($all_colors, $i)});
        border-right: 1px solid variable(#{nth($all_colors, $i)});
      }
      
      tr th:first-child { border-left: none; }
      tr th:last-child { border-right: none; }
    }
  }
}

.is-table {
  border: 1px solid variable("grey");
  
  td,
  th {
    padding: .75rem 1rem;
    border: 1px solid variable("grey");
  }
  
  th {
    background: variable("grey");
  }
}

@include generate_tables;