<commit_before>////
/// @author <NAME> (Originally from Foundation 4 and 5)
/// @group support
////

// Functions that allow you to think in pixels, but render rems (or ems)
// Pixel fallbacks should be provided with a Postprocessor if required.

/// For use in media queries
/// Media queries don't pay attention to the html element's body size and always go
/// with the browser default (16px).
///
/// @param {List} $values
///   The values to convert to root-ems.
///
/// @returns {List}
///   The converted values
///
/// @access public
///
@function root-em($values) {
  @return em($values, $base-rem-base);
}

/// This is the old em-calc function from Foundation 4
/// The new em-calc function in Foundation 5 inexpicably delegates to rem-calc
/// Source: Foundation 4
///
/// @access public
///
@function em($values, $base-value: $base-rem-base) {
    $max: length($values); // Get the total number of parameters passed

    @if $max == 1 {
      @return px-em(nth($values, 1), $base-value);
    }

    $emValues: ();
    @for $i from 1 through $max {
        $emValues: append($emValues, px-em(nth($values, $i), $base-value));
    }
    @return $emValues;
}

/// Convert a pixel value to its rem equivalent
/// Source: Foundation 5
///
/// @access public
///
@function rem($values) {
  $max: length($values);

  @if $max == 1 {
    @return px-rem(nth($values, 1));
  }

  $remValues: ();
  @for $i from 1 through $max {
    $remValues: append($remValues, px-rem(nth($values, $i)));
  }
  @return $remValues;
}

/// Remove the unit from a number
///
/// @access private
///
@function strip-unit($num) {
  @return $num / ($num * 0 + 1);
}

/// Convert value to rems
///
/// @access private
///
@function px-rem($value) {
  // Strip units of both in case $value is passed in without units
  $value: strip-unit($value) / strip-unit($base-rem-base) * 1rem;
  @if $value == 0rem {
    $value: 0;
  }
  @return $value;
}

///
/// @access private
///
@function px-em($value, $base-value: $base-rem-base) {
  // Strip units of both in case $value is passed in without units
  $value: strip-unit($value) / strip-unit($base-value) * 1em;
  @if $value == 0em {
    $value: 0;
  }
  @return $value;<commit_msg>fix: Typo in unit conversion<commit_after>////
/// @author <NAME> (Originally from Foundation 4 and 5)
/// @group support
////

// Functions that allow you to think in pixels, but render rems (or ems)
// Pixel fallbacks should be provided with a Postprocessor if required.

/// For use in media queries
/// Media queries don't pay attention to the html element's body size and always go
/// with the browser default (16px).
///
/// @param {List} $values
///   The values to convert to root-ems.
///
/// @returns {List}
///   The converted values
///
/// @access public
///
@function root-em($values) {
  @return em($values, $bass-rem-base);
}

/// This is the old em-calc function from Foundation 4
/// The new em-calc function in Foundation 5 inexpicably delegates to rem-calc
/// Source: Foundation 4
///
/// @access public
///
@function em($values, $base-value: $bass-rem-base) {
    $max: length($values); // Get the total number of parameters passed

    @if $max == 1 {
      @return px-em(nth($values, 1), $base-value);
    }

    $emValues: ();
    @for $i from 1 through $max {
        $emValues: append($emValues, px-em(nth($values, $i), $base-value));
    }
    @return $emValues;
}

/// Convert a pixel value to its rem equivalent
/// Source: Foundation 5
///
/// @access public
///
@function rem($values) {
  $max: length($values);

  @if $max == 1 {
    @return px-rem(nth($values, 1));
  }

  $remValues: ();
  @for $i from 1 through $max {
    $remValues: append($remValues, px-rem(nth($values, $i)));
  }
  @return $remValues;
}

/// Remove the unit from a number
///
/// @access private
///
@function strip-unit($num) {
  @return $num / ($num * 0 + 1);
}

/// Convert value to rems
///
/// @access private
///
@function px-rem($value) {
  // Strip units of both in case $value is passed in without units
  $value: strip-unit($value) / strip-unit($bass-rem-base) * 1rem;
  @if $value == 0rem {
    $value: 0;
  }
  @return $value;
}

///
/// @access private
///
@function px-em($value, $base-value: $bass-rem-base) {
  // Strip units of both in case $value is passed in without units
  $value: strip-unit($value) / strip-unit($base-value) * 1em;
  @if $value == 0em {
    $value: 0;
  }
  @return $value;
{'fraction_non_alphanumeric': 0.17822453128529478, 'fraction_numerical': 0.009939010616670432, 'mean_word_length': 2.686927560366361, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6029958', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1463, 'n_words': 501}