<commit_before>/// Scale a value relative to the viewport width by generating media queries at set intervals
/// @group Main
/// @param {String} $property - Property to scale
/// @param {Number} $start - Starting value
/// @param {Number} $end - Ending value
/// @param {Number} $min-width - Starting viewport width
/// @param {Number} $max-width - Ending viewport width
/// @param {Number} $min-step [null] - Minimum increment to adjust value
/// @param {Number} $max-steps [10] - Maximum number of times to adjust the value
/// @require {mixin} fs-min-width
/// @ignore Demo https://www.sassmeister.com/gist/aafd476fd2e7671c92e2ebb47a431821
/// @ignore Inspired by http://www.bookcasey.com/fittext/
/// @link https://github.com/bookcasey/fittext
/// @example scss
///   @include fs-scale-mq(line-height, 1.7, 1.5, 320px, 450px, $min-step: 0.05);
@mixin fs-scale-mq($property, $start, $end, $min-width, $max-width, $min-step: null, $max-steps: 10) {
  @if $min-width >= $max-width {
    @error '🔴  fs-scale-mq() max-width must be greater than min-width';
  }

  @if unit($start) != unit($end) {
    @error '🔴  fs-scale-mq() units don’t match';
  }

  @if $min-step != null and unit($min-step) != unit($start) {
    @error '🔴  $min-step units in fs-scale-mq() don’t match';
  }

  @if not unitless($max-steps) or type-of($max-steps) != 'number' {
    @error '🔴  $max-steps in fs-scale-mq() must be a unitless number';
  }

  @if $start == $end {
    @warn '⚠️ fs-scale-mq() values are the same';
  }

  // Multiplier used to control whether value should increase or descrease
  $sign: if($end < $start, -1, 1);

  // Total amount value will change
  $spread: abs($end - $start);

  // Number of times to adjust the value between $min-width and $max-width
  // Will adjust later if necessary based on $min-step value
  $steps: $max-steps;

  // Amount to increase/decrease the value at each step
  // Based on $max-steps by default, will adjust later if necessary based on $min-step value
  $step: $spread / $max-steps;

  // If $min-step was defined, compare steps to $max-steps
  @if $min-step != null {

    // Only update steps count if $min-step amount results in fewer steps than $max-steps
    @if ($spread / $min-step) < $max-steps {
      $step: $min-step;
      $steps: $spread / $min-step;
    }
  }

  // If $steps isn’t a whole number, round up
  // We will make sure this doesn’t result in extra code below
  $steps: ceil($steps);

  // Media query spread
  $mq-spread: $max-width - $min-width;

  // Calcuate media query step size
  $mq-step: round(($max-width - $min-width) / $steps);

  // Debug
  // content: 'spread: #{$spread}, steps: #{$steps}, step: #{$step}, mqSpread: #{$mq-spread}, mqStep: #{$mq-step}';

  // Starting value
  #{$property}: $start;

  // Generate media queries
  @for $i from 1 through $steps {
    $breakpoint: $min-width + ($mq-step * $i);
    $value: $start + ($sign * $step * $i);

    // Ensure we don’t output extra media queries due to rounding
    @if $breakpoint < $max-width and (if $sign == 1, $value < $end, $value > $end) {
      @include fs-min-width($breakpoint) {
        #{$property}: $value;
      }
    }
  }// end @for loop

  // Ending value
  @include fs-min-width($max-width) {
    #{$property}: $end;
  }
}
<commit_msg>fix: refactor scale-mq() mixin syntax to fix error in Dart Sass<commit_after>/// Scale a value relative to the viewport width by generating media queries at set intervals
/// @group Main
/// @param {String} $property - Property to scale
/// @param {Number} $start - Starting value
/// @param {Number} $end - Ending value
/// @param {Number} $min-width - Starting viewport width
/// @param {Number} $max-width - Ending viewport width
/// @param {Number} $min-step [null] - Minimum increment to adjust value
/// @param {Number} $max-steps [10] - Maximum number of times to adjust the value
/// @require {mixin} fs-min-width
/// @ignore Demo https://www.sassmeister.com/gist/aafd476fd2e7671c92e2ebb47a431821
/// @ignore Inspired by http://www.bookcasey.com/fittext/
/// @link https://github.com/bookcasey/fittext
/// @example scss
///   @include fs-scale-mq(line-height, 1.7, 1.5, 320px, 450px, $min-step: 0.05);
@mixin fs-scale-mq($property, $start, $end, $min-width, $max-width, $min-step: null, $max-steps: 10) {
  @if $min-width >= $max-width {
    @error '🔴  fs-scale-mq() max-width must be greater than min-width';
  }

  @if unit($start) != unit($end) {
    @error '🔴  fs-scale-mq() units don’t match';
  }

  @if $min-step != null and unit($min-step) != unit($start) {
    @error '🔴  $min-step units in fs-scale-mq() don’t match';
  }

  @if not unitless($max-steps) or type-of($max-steps) != 'number' {
    @error '🔴  $max-steps in fs-scale-mq() must be a unitless number';
  }

  @if $start == $end {
    @warn '⚠️ fs-scale-mq() values are the same';
  }

  // Multiplier used to control whether value should increase or descrease
  $sign: if($end < $start, -1, 1);

  // Total amount value will change
  $spread: abs($end - $start);

  // Number of times to adjust the value between $min-width and $max-width
  // Will adjust later if necessary based on $min-step value
  $steps: $max-steps;

  // Amount to increase/decrease the value at each step
  // Based on $max-steps by default, will adjust later if necessary based on $min-step value
  $step: $spread / $max-steps;

  // If $min-step was defined, compare steps to $max-steps
  @if $min-step != null {

    // Only update steps count if $min-step amount results in fewer steps than $max-steps
    @if ($spread / $min-step) < $max-steps {
      $step: $min-step;
      $steps: $spread / $min-step;
    }
  }

  // If $steps isn’t a whole number, round up
  // We will make sure this doesn’t result in extra code below
  $steps: ceil($steps);

  // Media query spread
  $mq-spread: $max-width - $min-width;

  // Calcuate media query step size
  $mq-step: round(($max-width - $min-width) / $steps);

  // Debug
  // content: 'spread: #{$spread}, steps: #{$steps}, step: #{$step}, mqSpread: #{$mq-spread}, mqStep: #{$mq-step}';

  // Starting value
  #{$property}: $start;

  // Generate media queries
  @for $i from 1 through $steps {
    $breakpoint: $min-width + ($mq-step * $i);
    $value: $start + ($sign * $step * $i);

    // Ensure we don’t output extra media queries due to rounding
    $is-below-cutoff: if($sign == 1, $value < $end, $value > $end);
    @if $breakpoint < $max-width and $is-below-cutoff {
      @include fs-min-width($breakpoint) {
        #{$property}: $value;
      }
    }
  }// end @for loop

  // Ending value
  @include fs-min-width($max-width) {
    #{$property}: $end;
  }
}

{'fraction_non_alphanumeric': 0.16914526062791047, 'fraction_numerical': 0.012017425266636622, 'mean_word_length': 2.9373151981076284, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '2819184', 'n_tokens_mistral': 2381, 'n_tokens_neox': 2285, 'n_words': 745}