Sha256: 747ea08ee21ebc7dc535972868b761f02b39d72ba097a0f72989d7798d470b18

Contents?: true

Size: 676 Bytes

Versions: 51

Compression:

Stored size: 676 Bytes

Contents

@function bc-util-list-join($list, $separator, $slice-start: 1, $slice-end: 0) {
  $result: "";

  @if type-of($list) == list {
    $length: length($list);

    @if $slice-end == false {
      $slice-end: length($list);
    }

    @if $slice-start < 0 {
      $slice-start: length($list) + $slice-start + 1;
    }

    @if $slice-end < 0 {
      $slice-end: length($list) + $slice-end + 1;
    }

    @for $i from $slice-start through $length - $slice-end {
      @if $result == "" {
        $result: nth($list, $i);
      }

      @else {
        $result: $result + "#{$separator}" + nth($list, $i);
      }
    }
  }

  @else {
    $result: $list;
  }

  @return $result;
}

Version data entries

51 entries across 51 versions & 2 rubygems

Version Path
flint-gs-2.3.6 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.3.5 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.3.4 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.3.3 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.3.2 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.3.1 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.3.0 tests/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.14 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.13 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
flint-gs-2.2.0 tests/bootcamp/dist/utils/_list-join.scss
flint-gs-2.1.4 tests/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.12 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.11 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.10 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.5 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.4 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.3 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.2 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.6.0 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss
oulu-rails-0.5.37 vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss