@use "./base";

// Generate simple col-offset values
@mixin generate-static-offset {
  @for $i from 1 through (base.$agrid-column-system - 1) {
    .acol-offset-#{$i} {
      grid-column-start: $i + 1;
    }
  }
}

// Generate responsive offsets - has a fallback for auto col start
@mixin generate-resp-offset {
  @each $key, $value in base.$agrid-breakpoints {
    :where(*[class*="#{$key}\:acol-offset"]) {
      grid-column-start: auto;
    }

    @media (min-width: #{$value}) {
      @for $col-num from 1 through (base.$agrid-column-system - 1) {
        .#{$key}\:acol-offset-#{$col-num} {
          grid-column-start: $col-num + 1;
        }
      }
    }
  }
}
