Sha256: 996fbcf4f854241c5d3506c4122524bd45f29064f88a3b461bcae68ac20c8fea

Contents?: true

Size: 1.79 KB

Versions: 46

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: false;
    }

    // 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: false;
          }
        }

        @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: false;
          }

          @else if $value == $G2 {
            $G2: false;
          }
        }
      }
    }
  }
  @return $G1, $G2, $pos, $shape-size;
}

Version data entries

46 entries across 46 versions & 8 rubygems

Version Path
daiblogs-0.2.1 _sass/bourbon/helpers/_radial-arg-parser.scss
daiblogs-0.2.0 _sass/bourbon/helpers/_radial-arg-parser.scss
daiblogs-0.1.5 _sass/bourbon/helpers/_radial-arg-parser.scss
daiblogs-0.1.4 _sass/bourbon/helpers/_radial-arg-parser.scss
daiblogs-0.1.2 assets/_sass/bourbon/helpers/_radial-arg-parser.scss
daiblogs-0.1.1 assets/_sass/bourbon/helpers/_radial-arg-parser.scss
daiblogs-0.1.0 assets/_sass/bourbon/helpers/_radial-arg-parser.scss
moovui-0.1.4 app/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss
stump-cli-0.1.3 lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss
stump-cli-0.1.2 lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss
moovui-0.1.3 app/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss
moovui-0.1.2 app/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss
moovui-0.1.1 app/assets/stylesheets/bourbon/helpers/_radial-arg-parser.scss
moovui-0.0.2 bourbon/helpers/_radial-arg-parser.scss
moovui-0.0.1 bourbon/helpers/_radial-arg-parser.scss
stump-cli-0.1.1 lib/wp/wp-content/themes/stump/assets/vendor/manhattan/bourbon/helpers/_radial-arg-parser.scss
blogelator-0.2.5 vendor/assets/stylesheets/blogelator/bourbon/helpers/_radial-arg-parser.scss
blocky-0.0.11 vendor/assets/stylesheets/blocky/bourbon/helpers/_radial-arg-parser.scss
blogelator-0.2.4 vendor/assets/stylesheets/blogelator/bourbon/helpers/_radial-arg-parser.scss
blocky-0.0.10 vendor/assets/stylesheets/blocky/bourbon/helpers/_radial-arg-parser.scss