@use "../base-styles/mixins" as mixins;

.wp-block-latest-posts {

  @include mixins.break-small {
    @for $i from 2 through 6 {
      &.columns-#{ $i } li {
        width: 100%;

        &:nth-child( #{ $i }n ) {
          margin-right: 1.25em;
        }
      }
    }
  }

  @include mixins.break-medium {
    @for $i from 2 through 6 {
      &.columns-#{ $i } li {
        width: calc((100% / #{ $i }) - 1.25em + (1.25em / #{ $i }));

        &:nth-child( #{ $i }n ) {
          margin-right: 0;
        }
      }
    }
  }
}
