Sha256: 965a63afa429fe6133ce21ba018e16730961b8445b11bf1a06afc1c26f717562

Contents?: true

Size: 1.79 KB

Versions: 131

Compression:

Stored size: 1.79 KB

Contents

@function _radial-arg-parser($g1, $g2, $pos, $shape-size) {
  @each $value in $g1, $g2 {
    $first-val: nth($value, 1);
    $pos-type:  type-of($first-val);
    $spec-at-index: null;

    // Determine if spec was passed to mixin
    @if type-of($value) == list {
      $spec-at-index: if(index($value, at), index($value, at), false);
    }
    @if $spec-at-index {
      @if $spec-at-index > 1 {
        @for $i from 1 through ($spec-at-index - 1) {
          $shape-size: $shape-size nth($value, $i);
        }
        @for $i from ($spec-at-index + 1) through length($value) {
          $pos: $pos nth($value, $i);
        }
      }
      @else if $spec-at-index == 1 {
        @for $i from ($spec-at-index + 1) through length($value) {
          $pos: $pos nth($value, $i);
        }
      }
      $g1: null;
    }

    // If not spec calculate correct values
    @else {
      @if ($pos-type != color) or ($first-val != "transparent") {
        @if ($pos-type == number)
        or ($first-val == "center")
        or ($first-val == "top")
        or ($first-val == "right")
        or ($first-val == "bottom")
        or ($first-val == "left") {

          $pos: $value;

          @if $pos == $g1 {
            $g1: null;
          }
        }

        @else if
           ($first-val == "ellipse")
        or ($first-val == "circle")
        or ($first-val == "closest-side")
        or ($first-val == "closest-corner")
        or ($first-val == "farthest-side")
        or ($first-val == "farthest-corner")
        or ($first-val == "contain")
        or ($first-val == "cover") {

          $shape-size: $value;

          @if $value == $g1 {
            $g1: null;
          }

          @else if $value == $g2 {
            $g2: null;
          }
        }
      }
    }
  }
  @return $g1, $g2, $pos, $shape-size;
}

Version data entries

131 entries across 124 versions & 21 rubygems

Version Path
middleman-core-4.5.1 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.5.0 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.4.3 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.4.2 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.4.0 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.11 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.10 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.8 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.7 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-core-4.3.3/fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.6 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.5 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.4 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.3 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.2 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.1 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
middleman-core-4.3.0 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss
federalist-basic-report-theme-0.1.7 _sass/uswds/lib/helpers/_radial-arg-parser.scss
uswds-jekyll-4.2.0 _sass/uswds/lib/helpers/_radial-arg-parser.scss
middleman-core-4.3.0.rc.4 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_radial-arg-parser.scss