jdsteinbach
3/11/2015 - 4:31 PM

Generated by SassMeister.com.

Generated by SassMeister.com.

<div class='box-1'></div>
<div class='box-2'></div>
<div class='box-3'></div>
<div class='box-4'></div>
test:nth-last-child(n+6):first-child, test:nth-last-child(n+6):first-child ~ * {
  content: 'n + 6'; }
test:nth-last-child(n+6):first-child, test:nth-last-child(n+6):first-child ~ * {
  content: 'n + 6'; }
test:nth-last-child(n+6):first-child, test:nth-last-child(n+6):first-child ~ * {
  content: 'n + 6'; }
test:nth-last-child(n+6):first-child, test:nth-last-child(n+6):first-child ~ * {
  content: 'n + 6'; }
test:nth-last-child(-n+6):first-child, test:nth-last-child(-n+6):first-child ~ * {
  content: '-n + 6'; }
test:nth-last-child(-n+6):first-child, test:nth-last-child(-n+6):first-child ~ * {
  content: '-n + 6'; }
test:nth-last-child(-n+6):first-child, test:nth-last-child(-n+6):first-child ~ * {
  content: '-n + 6'; }
test:nth-last-child(-n+6):first-child, test:nth-last-child(-n+6):first-child ~ * {
  content: '-n + 6'; }
test:nth-last-child(6):first-child, test:nth-last-child(6):first-child ~ * {
  content: '6'; }
test:nth-last-child(6):first-child, test:nth-last-child(6):first-child ~ * {
  content: '6'; }
test:nth-last-child(6):first-child, test:nth-last-child(6):first-child ~ * {
  content: '6'; }
test:nth-last-child(6):first-child, test:nth-last-child(6):first-child ~ * {
  content: '6'; }
test:nth-last-child(6):first-child, test:nth-last-child(6):first-child ~ * {
  content: '6'; }
// ----
// libsass (v3.1.0)
// ----

@mixin quantity-query( $number, $comparison: 'equal' ) {
  $nth: '';
  
  @if index( ('greater' 'more' '>'), $comparison ) {
    $nth: 'n + #{$number}';
  } @else if index( ('less' 'fewer' '<'), $comparison ) {
    $nth: '-n + #{$number}';
  } @else if index( ('equal' 'same' '='), $comparison ) {
    $nth: $number;
  } @else {
    @warn "Sorry, that's an invalid $comparison value."
  }
  
  &:nth-last-child(#{$nth}):first-child {
    &,
    & ~ * {
      @content;
    }
  }
}

@mixin qq-equal( $number ) {
  @include quantity-query( $number, equal ) {
    @content;
  }
}

@mixin qq-greater( $number ) {
  @include quantity-query( $number, greater ) {
    @content;
  }
}

@mixin qq-less( $number ) {
  @include quantity-query( $number, less ) {
    @content;
  }
}

test {
  @include quantity-query(6, greater) {
    content: 'n + 6';
  }
  @include quantity-query(6, more) {
    content: 'n + 6';
  }
  @include quantity-query(6, '>') {
    content: 'n + 6';
  }
  @include qq-greater(6) {
    content: 'n + 6';
  }
  
  @include quantity-query(6, less) {
    content: '-n + 6';
  }
  @include quantity-query(6, fewer) {
    content: '-n + 6';
  }
  @include quantity-query(6, '<') {
    content: '-n + 6';
  }
  @include qq-less(6) {
    content: '-n + 6';
  }
  
  @include quantity-query(6) {
    content: '6';
  }
  @include quantity-query(6, equal) {
    content: '6';
  }
  @include quantity-query(6, same) {
    content: '6';
  }
  @include quantity-query(6, '=') {
    content: '6';
  }
  @include qq-equal(6) {
    content: '6';
  }
}