<commit_before>// MEASUREMENTS

// Grid types to work on -- column, scale
$grid-type: column !default
$scale-grid-direction: rtl !default

$base-size: 16px !default
$line-height: 1.3em !default

$grid-width: 90% !default
$columns: 12 !default
$wrapper-align: center !default
$gutter: 2% !default
$padding: 0 !default

$max-width: dp(1400) !default

// DEFATULTS TO OOSASS WITH @EXTEND
$oocss-grid: false !default

// BUILD GRID OBJECTS
$object-type: "%" !default
@if $oocss-grid
  $grid-placeholder: "." !default
$width-prefix: "w-" !default
$column-prefix: "c-" !default

html
  font-size: $base-size
  line-height: $line-height

#{$object-type}wrapper
  width: $grid-width
  max-width: $max-width
  position: relative
  @if $wrapper-align == "center"
    margin-left: auto
    margin-right: auto
  @if $wrapper-align == "right"
    margin-left: auto
    margin-right: 0

// COLUMN GRID
$calculated-gutter: $gutter
@if $gutter == 0
  $gutter: 0%
@if unit($gutter) != "%"
  $calculated-gutter: percentage($gutter / $grid-width)
$calculated-column: (100% - ($calculated-gutter * ($columns - 1))) / $columns
@function grid($units, $grid-width)
  @return ($calculated-column * $units) + ($calculated-gutter * ($units - 1))

// For the next column in a series. It floats and spaces to sit on the grid next to the one before it.
#{$object-type}column
  float: left
  margin-left: $calculated-gutter
  @if $padding != 0
    padding: 0 $padding
    // box sizing to make sure padding doesn't effect grid.
    +prefix(box-sizing, border-box, -webkit- -moz-)
    // Polyfill for old IE https://github.com/Schepp/box-sizing-polyfill
    *behavior: url(../js/boxsizing.htc)

#{$object-type}all-columns
  width: 100%

#{$object-type}first-column
  margin-left: 0

// Grid widths
=grid-widths
  @for $i from 1 through $columns
    // Writes classes or placeholders depending on the $object-type variable.
    // You may also like a more semantic prefix, like "width-". You can chage it by changing the $width-prefix variable.
    #{$object-type}#{$width-prefix+$i}
      width:  grid($i)

+grid-widths

// Column locations in absolute positions. Use next-col in a series.
@for $i from 0 through $columns
  // Writes classes or placeholders depending on the $object-type variable.
  // You may also like a more semantic prefix, like "column-". You can chage it by changing the $column-prefix variable.
  #{$object-type}#{$column-prefix+$i}
    position: absolute
    left:  grid($i) + $calculated-gutter


// Scale grid math
// Requires modular-scale (https://github.com/scottkellum/modular-scale)
$modular-scale-loaded: false !default
$scale-grid-direction: ltr !default

@if $grid-type == "scale"
  @if $modular-scale-loaded
    
    // Core logic function
    @function ms-grid($units, $ratio)
      $column-sum: 100%
      $grid-sum: 0%
      $column-ratio: $ratio
      $return: 0
      $column-short: false
      @if $ratio > 1
        $column-ratio: 1 / $ratio
      @for $i from 1 through $units
        $column-sum: ms($i, 100%, $column-ratio)
        $grid-sum: $column-sum + $grid-sum<commit_msg>mixin for grid columns for OOCSS breakpoint generation.<commit_after>// MEASUREMENTS

// Grid types to work on -- column, scale
$grid-type: column !default
$scale-grid-direction: rtl !default

$base-size: 16px !default
$line-height: 1.3em !default

$grid-width: 90% !default
$columns: 12 !default
$wrapper-align: center !default
$gutter: 2% !default
$padding: 0 !default

$max-width: dp(1400) !default

// DEFATULTS TO OOSASS WITH @EXTEND
$oocss-grid: false !default

// BUILD GRID OBJECTS
$object-type: "%" !default
@if $oocss-grid
  $grid-placeholder: "." !default
$width-prefix: "w-" !default
$column-prefix: "c-" !default

html
  font-size: $base-size
  line-height: $line-height

#{$object-type}wrapper
  width: $grid-width
  max-width: $max-width
  position: relative
  @if $wrapper-align == "center"
    margin-left: auto
    margin-right: auto
  @if $wrapper-align == "right"
    margin-left: auto
    margin-right: 0

// COLUMN GRID
$calculated-gutter: $gutter
@if $gutter == 0
  $gutter: 0%
@if unit($gutter) != "%"
  $calculated-gutter: percentage($gutter / $grid-width)
$calculated-column: (100% - ($calculated-gutter * ($columns - 1))) / $columns
@function grid($units, $grid-width)
  @return ($calculated-column * $units) + ($calculated-gutter * ($units - 1))

// For the next column in a series. It floats and spaces to sit on the grid next to the one before it.
#{$object-type}column
  float: left
  margin-left: $calculated-gutter
  @if $padding != 0
    padding: 0 $padding
    // box sizing to make sure padding doesn't effect grid.
    +prefix(box-sizing, border-box, -webkit- -moz-)
    // Polyfill for old IE https://github.com/Schepp/box-sizing-polyfill
    *behavior: url(../js/boxsizing.htc)

#{$object-type}all-columns
  width: 100%

#{$object-type}first-column
  margin-left: 0

// Grid widths
=grid-widths
  @for $i from 1 through $columns
    // Writes classes or placeholders depending on the $object-type variable.
    // You may also like a more semantic prefix, like "width-". You can chage it by changing the $width-prefix variable.
    #{$object-type}#{$width-prefix+$i}
      width:  grid($i)

+grid-widths

// Column locations in absolute positions. Use next-col in a series.
=grid-columns
  @for $i from 0 through $columns
    // Writes classes or placeholders depending on the $object-type variable.
    // You may also like a more semantic prefix, like "column-". You can chage it by changing the $column-prefix variable.
    #{$object-type}#{$column-prefix+$i}
      position: absolute
      left:  grid($i) + $calculated-gutter

+grid-columns


// Scale grid math
// Requires modular-scale (https://github.com/scottkellum/modular-scale)
$modular-scale-loaded: false !default
$scale-grid-direction: ltr !default

@if $grid-type == "scale"
  @if $modular-scale-loaded
    
    // Core logic function
    @function ms-grid($units, $ratio)
      $column-sum: 100%
      $grid-sum: 0%
      $column-ratio: $ratio
      $return: 0
      $column-short: false
      @if $ratio > 1
        $column-ratio: 1 / $ratio
      @for $i from 1 through $units
        $column-sum: ms($i, 100%, $column-ratio)
        $grid-sum: $column-sum + $grid-sum
{'fraction_non_alphanumeric': 0.14531823257297816, 'fraction_numerical': 0.013080236082309779, 'mean_word_length': 3.2886456908344734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '2445909', 'n_tokens_mistral': 2238, 'n_tokens_neox': 2099, 'n_words': 646}