<commit_before>//============================================
// Position
//============================================

=position($amounts, $sides, $pos: absolute, $auto-overwrite: false)

  @if $amounts and $sides

    $map: ( top: null, left: null, right: null, bottom: null,)

    // Set to complete overwrite mode
    @if $auto-overwrite
      $map: ( top: auto, left: auto, right: auto, bottom: auto,)

    // Position property - validation & render
    @if $pos == absolute or $pos == fixed or $pos == relative or $pos == static
      position: $pos
    @else if $pos != none
      @warn "The $pos argument is invalid, use `absolute`, `fixed`, `relative`, `static`, or `none` (invalid value: #{$pos})"

    // Populate the map with sides
    @if $sides == all and length($amounts) == 1
      top: $amounts; left: $amounts; right: $amounts; bottom: $amounts

    @else if length($sides) == length($amounts)
      @for $i from 1 through length($sides)
        $map: map-merge($map, (nth($sides, $i):nth($amounts, $i)))

    @else if length($amounts) == 1
      @for $i from 1 through length($sides)
        $map: map-merge($map, (nth($sides, $i):$amounts))

    @else
      @warn "The number of $amounts has to match the $sides or be a single value"

    // Render (properties with value `null` don't get rendered)
    @each $key, $val in $map
      #{$key}: #{$val}

    // Validation, still rendering but at least you know
    @each $amount in $amounts
      @if type-of($amount) == number or $amount == auto
      @else
        @warn "Invalid amount: #{$amount}"<commit_msg>[fix] missing if in position mixin, this close #1<commit_after>//============================================
// Position
//============================================

=position($amounts, $sides, $pos: absolute, $auto-overwrite: false)

  @if $amounts and $sides

    $map: ( top: null, left: null, right: null, bottom: null,)

    // Set to complete overwrite mode
    @if $auto-overwrite
      $map: ( top: auto, left: auto, right: auto, bottom: auto,)

    // Position property - validation & render
    @if $pos == absolute or $pos == fixed or $pos == relative or $pos == static
      position: $pos
    @else if $pos != none
      @warn "The $pos argument is invalid, use `absolute`, `fixed`, `relative`, `static`, or `none` (invalid value: #{$pos})"

    // Populate the map with sides
    @if $sides == all and length($amounts) == 1
      top: $amounts; left: $amounts; right: $amounts; bottom: $amounts

    @else if length($sides) == length($amounts)
      @for $i from 1 through length($sides)
        $map: map-merge($map, (nth($sides, $i):nth($amounts, $i)))

    @else if length($amounts) == 1
      @for $i from 1 through length($sides)
        $map: map-merge($map, (nth($sides, $i):$amounts))

    @else
      @warn "The number of $amounts has to match the $sides or be a single value"

    // Render (properties with value `null` don't get rendered)
    @each $key, $val in $map
      @if $val != null
        #{$key}: #{$val}

    // Validation, still rendering but at least you know
    @each $amount in $amounts
      @if type-of($amount) == number or $amount == auto
      @else
        @warn "Invalid amount: #{$amount}"
{'fraction_non_alphanumeric': 0.20452432599938022, 'fraction_numerical': 0.0027889680818097306, 'mean_word_length': 3.1651612903225805, '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': '7560324', 'n_tokens_mistral': 1030, 'n_tokens_neox': 986, 'n_words': 364}