<commit_before>// Keep images from scaling beyond the width of their parents.
@mixin img-responsive($display: block) {
  display: $display;
  max-width: 100%; // Part 1: Set a maximum relative to the parent.
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching.
}

// A convenience function for setting `position:`.
// NOTE: A unitless value is equal to it not existing in the rendered
// property call.
@mixin position($position: relative, $coordinates: 0 0 0 0) {
  @if type-of($position) == list {
    $coordinates: $position;
    $position: relative;
  }

  $top: nth($coordinates, 1);
  $right: nth($coordinates, 2);
  $bottom: nth($coordinates, 3);
  $left: nth($coordinates, 4);

  position: $position;

  @if not(unitless($top)) { top: $top; }
  @if not(unitless($right)) { right: $right; }
  @if not(unitless($bottom)) { bottom: $bottom; }
  @if not(unitless($left)) { left: $left; }
}


// A convenience mixin for vertically and horizontally centering any
// element with a parent container.
@mixin absolute-center() {
  @include position(absolute, 0px 0px 0px 0px);
  display: block;
  margin: auto;<commit_msg>Add a mixin for calculating intrinsic ratios. Better than me doing it manually. :/<commit_after>// Keep images from scaling beyond the width of their parents.
@mixin img-responsive($display: block) {
  display: $display;
  max-width: 100%; // Part 1: Set a maximum relative to the parent.
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching.
}

// A convenience mixin for enforcing intrinsic ratios.
@mixin intrinisic($width, $ratio) {
  width: $width; height: 0;
  padding-bottom: percentage(#{$width/$ratio});
}

// A convenience function for setting `position:`.
// NOTE: A unitless value is equal to it not existing in the rendered
// property call.
@mixin position($position: relative, $coordinates: 0 0 0 0) {
  @if type-of($position) == list {
    $coordinates: $position;
    $position: relative;
  }

  $top: nth($coordinates, 1);
  $right: nth($coordinates, 2);
  $bottom: nth($coordinates, 3);
  $left: nth($coordinates, 4);

  position: $position;

  @if not(unitless($top)) { top: $top; }
  @if not(unitless($right)) { right: $right; }
  @if not(unitless($bottom)) { bottom: $bottom; }
  @if not(unitless($left)) { left: $left; }
}

// A convenience mixin for vertically and horizontally centering any element
// with a parent container.
@mixin absolute-center() {
  @include position(absolute, 0px 0px 0px 0px);
  display: block;
  margin: auto;
{'fraction_non_alphanumeric': 0.1396887159533074, 'fraction_numerical': 0.013618677042801557, 'mean_word_length': 4.091089108910891, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4221660', 'n_tokens_mistral': 860, 'n_tokens_neox': 796, 'n_words': 296}