Sha256: ee55f13ddc99ec8a7eb23c9330302a5c1ab65c3d6016d43bf05b31372fe52cb6

Contents?: true

Size: 1.79 KB

Versions: 353

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

353 entries across 342 versions & 11 rubygems

Version Path
card-mod-bootstrap-0.18.1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.18.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.17.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.16.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.6 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.5 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.4 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.3 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.1.2 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.2.pre1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.1.1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
card-mod-bootstrap-0.15.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/helpers/_radial-arg-parser.scss
portfolio-jekyll-theme-2.0.0 _sass/1-tools/bourbon/helpers/_radial-arg-parser.scss
hanuman-0.3.0 _sass/bourbon/helpers/_radial-arg-parser.scss
hanuman-0.2.0 _sass/bourbon/helpers/_radial-arg-parser.scss
hanuman-0.1.0 _sass/bourbon/helpers/_radial-arg-parser.scss
wrgem-0.0.55 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/helpers/_radial-arg-parser.scss
wrgem-0.0.54 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/helpers/_radial-arg-parser.scss
wrgem-0.0.53 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/helpers/_radial-arg-parser.scss