<commit_before>//////////
// grid //
//////////

  @mixin cell($mult: null) {
    display: block;
    float: left;
    min-height: 1px; // http://css-tricks.com/make-sure-columns-dont-collapse-horizontally/
    background-clip: content-box;

    $gutter: if($mult!=false, margin-x($mult), $mult);
    padding-right: if($gutter, $gutter/2, null);
    padding-left: if($gutter, $gutter/2, null);
  }

  @mixin grid($mult: null, $cell: '*') {
    @if type-of($mult) == 'map' { @include grid($mult...); }
    @else {
      display: block;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      width: if($gutter, add-calc(100%, $gutter), null);
      margin-right: if($gutter, $gutter/-2, null);
      margin-left: if($gutter, $gutter/-2, null);
      @if $cell { & > #{$cell} { @include cell($mult); } }
    }
  }

  @mixin re-grid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include re-grid($mult...); }
    @else {

      display: block;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      @if $cell { & > #{$cell} { @include cell($mult); } }
    }
  }

/////////////////////
// fgrid (flexbox) //
/////////////////////

  @mixin fcell($mult: null) {
    flex: 1 1 auto;
    width: 0%;
    background-clip: content-box;
    min-width: 0%; // https://css-tricks.com/flexbox-truncated-text/

    $gutter: if($mult!=false, margin-x($mult), $mult);
    padding-right: if($gutter, $gutter/2, null);
    padding-left: if($gutter, $gutter/2, null);
  }

  @mixin fgrid($mult: null, $cell: '*') {
    @if type-of($mult) == 'map' { @include grid($mult...); }
    @else {
      display: flex;
      flex-wrap: wrap;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), $mult);
      width: if($gutter, calc(100% + #{$gutter}), null);
      margin-right: if($gutter, $gutter/-2, null);
      margin-left: if($gutter, $gutter/-2, null);
      @if $cell { & > #{$cell} { @include fcell($mult); } }
    }
  }

  @mixin re-fgrid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include re-grid($mult...); }
    @else {
      display: flex;
      flex-wrap: wrap;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      @if $cell { & > #{$cell} { @include fcell($mult); } }
    }
  }

//////////////////////////
// igrid (inline-block) //
//////////////////////////

  @mixin icell($mult: null) {
    display: inline-block;
    direction: rtl;
    vertical-align: top;
    min-height: 1px; // http://css-tricks.com/make-sure-columns-dont-collapse-horizontally/
    font-size: 1rem;
    width: 100%;
    background-clip: content-box;

    $gutter: if($mult!=false, margin-x($mult), $mult);
    padding-right: if($gutter, $gutter/2, null);
    padding-left: if($gutter, $gutter/2, null);
  }

  @mixin igrid($mult: null, $cell: '*') {
    @if type-of($mult) == 'map' { @include grid($mult...); }
    @else {
      display: block;
      font-size: 0rem;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      width: if($gutter, add-calc(100%, $gutter), null);
      margin-right: if($gutter, $gutter/-2, null);
      margin-left: if($gutter, $gutter/-2, null);
      @if $cell { & > #{$cell} { @include icell($mult); } }
    }
  }

  @mixin re-igrid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include re-grid($mult...); }
    @else {

      display: block;
      font-size: 0rem;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      @if $cell { & > #{$cell} { @include icell($mult); } }
    }
  }

/////////////
// un-grid //
/////////////

  @mixin un-grid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include un-grid($mult...); }
    @else {

      display: block;
      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      padding-right: if($gutter, $gutter/2, null);
      padding-left: if($gutter, $gutter/2, null);
    }
  }

//////////////////////
// cell (all types) //
//////////////////////

  // master mixin
  @mixin cell-posn($span: null, $push: null, $right: null, $left: null, $out: null) {
    @if type-of($push) == 'map' { @include cell-posn($span, $push...); }
    @else {
      $n: nth($span, 1) or medium-value('type-columns') or 4;
      $d: _nth($span, 2) or medium-value('grid-columns') or 4;
      flex-grow: 0;
      width: $n / $d * 100%;
      @if $right { margin-right: nth($right, 1) / (_nth($right, 2) or $d) * 100%; }
      @if $left { margin-left: nth($left, 1) / (_nth($left, 2) or $d) * 100%; }
      @else if $out {
        $side: map-get($out, (left: right, right: left));
        position: absolute; #{($side)}: 100%; top: auto;
      }
    }
  }

  // span only
  @mixin cell-span($span: null) {
    $n: nth($span, 1) or medium-value('type-columns') or 4;
    $d: _nth($span, 2) or medium-value('grid-columns') or 4;
    flex-grow: 0;
    width: $n / $d * 100%;
  }

  // push only
  @mixin cell-push($push: null, $right: null, $left: null, $out: null) {
    @if type-of($push) == 'map' { @include cell-push($push...); }
    @else {
      $d: medium-value('grid-columns') or 4;
      @if $right { margin-right: nth($right, 1) / (_nth($right, 2) or $d) * 100%; }
      @if $left { margin-left: nth($left, 1) / (_nth($left, 2) or $d) * 100%; }
      @else if $out {
        $side: map-get($out, (left: right, right: left));
        position: absolute; #{($side)}: 100%; top: auto;
      }
    }
  }

  // cycle; for floats
  @mixin cell-cycle($n) {
    &:nth-child(#{$n}n+#{$n+1}) {
      clear: left;
    }
  }
<commit_msg>fixes in grid mixins<commit_after>//////////
// grid //
//////////

  @mixin cell($mult: null) {
    display: block;
    float: left;
    width: 100%;
    min-height: 1px; // http://css-tricks.com/make-sure-columns-dont-collapse-horizontally/
    background-clip: content-box;

    $gutter: if($mult!=false, margin-x($mult), $mult);
    padding-right: if($gutter, $gutter/2, null);
    padding-left: if($gutter, $gutter/2, null);
  }

  @mixin grid($mult: null, $cell: '*') {
    @if type-of($mult) == 'map' { @include grid($mult...); }
    @else {
      display: block;
      position: relative; // for 'out' positioned cells which are absolute
      @include clearfix;

      $gutter: if($mult!=false, margin-x($mult), null);
      width: if($gutter, add-calc(100%, $gutter), null);
      margin-right: if($gutter, $gutter/-2, null);
      margin-left: if($gutter, $gutter/-2, null);
      @if $cell { & > #{$cell} { @include cell($mult); } }
    }
  }

  @mixin re-grid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include re-grid($mult...); }
    @else {

      display: block;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $span: nth($span, 1);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols/$span);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left/$span)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right/$span)));
      @if $cell { & > #{$cell} { @include cell($mult); } }
    }
  }

/////////////////////
// fgrid (flexbox) //
/////////////////////

  @mixin fcell($mult: null) {
    flex: 1 1 auto;
    width: 0%;
    background-clip: content-box;
    min-width: 0%; // https://css-tricks.com/flexbox-truncated-text/

    $gutter: if($mult!=false, margin-x($mult), $mult);
    padding-right: if($gutter, $gutter/2, null);
    padding-left: if($gutter, $gutter/2, null);
  }

  @mixin fgrid($mult: null, $cell: '*') {
    @if type-of($mult) == 'map' { @include grid($mult...); }
    @else {
      display: flex;
      flex-wrap: wrap;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), $mult);
      width: if($gutter, calc(100% + #{$gutter}), null);
      margin-right: if($gutter, $gutter/-2, null);
      margin-left: if($gutter, $gutter/-2, null);
      @if $cell { & > #{$cell} { @include fcell($mult); } }
    }
  }

  @mixin re-fgrid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include re-grid($mult...); }
    @else {
      display: flex;
      flex-wrap: wrap;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $span: nth($span, 1);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      @if $cell { & > #{$cell} { @include fcell($mult); } }
    }
  }

//////////////////////////
// igrid (inline-block) //
//////////////////////////

  @mixin icell($mult: null) {
    display: inline-block;
    direction: rtl;
    vertical-align: top;
    min-height: 1px; // http://css-tricks.com/make-sure-columns-dont-collapse-horizontally/
    font-size: 1rem;
    width: 100%;
    background-clip: content-box;

    $gutter: if($mult!=false, margin-x($mult), $mult);
    padding-right: if($gutter, $gutter/2, null);
    padding-left: if($gutter, $gutter/2, null);
  }

  @mixin igrid($mult: null, $cell: '*') {
    @if type-of($mult) == 'map' { @include grid($mult...); }
    @else {
      display: block;
      font-size: 0rem;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      width: if($gutter, add-calc(100%, $gutter), null);
      margin-right: if($gutter, $gutter/-2, null);
      margin-left: if($gutter, $gutter/-2, null);
      @if $cell { & > #{$cell} { @include icell($mult); } }
    }
  }

  @mixin re-igrid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include re-grid($mult...); }
    @else {

      display: block;
      font-size: 0rem;
      position: relative; // for 'out' positioned cells which are absolute

      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $span: nth($span, 1);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      @if $cell { & > #{$cell} { @include icell($mult); } }
    }
  }

/////////////
// un-grid //
/////////////

  @mixin un-grid($mult: null, $span: 1, $left: 0, $cell: '*'){
    @if type-of($mult) == 'map' { @include un-grid($mult...); }
    @else {

      display: block;
      $gutter: if($mult!=false, margin-x($mult), null);
      $grid-margin: div-calc($gutter, -2);
      $span-width: add-calc(100%, $gutter);
      $cols: _nth($span, 2) or medium-value('grid-columns') or 4;
      $right: $cols - $left - $span;
      width: mul-calc($span-width, $cols);
      margin-left: sub-calc($grid-margin, if($left == 0, 0, mul-calc($span-width, $left)));
      margin-right: sub-calc($grid-margin, if($right == 0, 0, mul-calc($span-width, $right)));
      padding-right: if($gutter, $gutter/2, null);
      padding-left: if($gutter, $gutter/2, null);
    }
  }

//////////////////////
// cell (all types) //
//////////////////////

  // master mixin
  @mixin cell-posn($span: null, $push: null, $right: null, $left: null, $out: null) {
    @if type-of($push) == 'map' { @include cell-posn($span, $push...); }
    @else {
      $n: nth($span, 1) or medium-value('type-columns') or 4;
      $d: _nth($span, 2) or medium-value('grid-columns') or 4;
      flex-grow: 0;
      width: $n / $d * 100%;
      @if $right { margin-right: nth($right, 1) / (_nth($right, 2) or $d) * 100%; }
      @if $left { margin-left: nth($left, 1) / (_nth($left, 2) or $d) * 100%; }
      @else if $out {
        $side: map-get($out, (left: right, right: left));
        position: absolute; #{($side)}: 100%; top: auto;
      }
    }
  }

  // span only
  @mixin cell-span($span: null) {
    $n: nth($span, 1) or medium-value('type-columns') or 4;
    $d: _nth($span, 2) or medium-value('grid-columns') or 4;
    flex-grow: 0;
    width: $n / $d * 100%;
  }

  // push only
  @mixin cell-push($push: null, $right: null, $left: null, $out: null) {
    @if type-of($push) == 'map' { @include cell-push($push...); }
    @else {
      $d: medium-value('grid-columns') or 4;
      @if $right { margin-right: nth($right, 1) / (_nth($right, 2) or $d) * 100%; }
      @if $left { margin-left: nth($left, 1) / (_nth($left, 2) or $d) * 100%; }
      @else if $out {
        $side: map-get($out, (left: right, right: left));
        position: absolute; #{($side)}: 100%; top: auto;
      }
    }
  }

  // cycle; for floats
  @mixin cell-cycle($n) {
    &:nth-child(#{$n}n+#{$n+1}) {
      clear: left;
    }
  }

{'fraction_non_alphanumeric': 0.23860329776915615, 'fraction_numerical': 0.016812156482379565, 'mean_word_length': 2.510213345438039, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7109488', 'n_tokens_mistral': 5937, 'n_tokens_neox': 5642, 'n_words': 1330}