Sha256: c785303c4b7d4b71bf3f4ff1439653e561e3ae7a6dcefa968b577fc9591f5cfd

Contents?: true

Size: 1.06 KB

Versions: 91

Compression:

Stored size: 1.06 KB

Contents

@function _linear-gradient-parser($image) {
  $image: unquote($image);
  $gradients: ();
  $start: str-index($image, "(");
  $end: str-index($image, ",");
  $first-val: str-slice($image, $start + 1, $end - 1);

  $prefix: str-slice($image, 0, $start);
  $suffix: str-slice($image, $end, str-length($image));

  $has-multiple-vals: str-index($first-val, " ");
  $has-single-position: unquote(_position-flipper($first-val) + "");
  $has-angle: _is-num(str-slice($first-val, 0, 0));

  @if $has-multiple-vals {
    $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals);
  }

  @else if $has-single-position != "" {
    $pos: unquote($has-single-position + "");

    $gradients: (
      webkit-image: -webkit- + $image,
      spec-image: $prefix + "to " + $pos + $suffix
    );
  }

  @else if $has-angle {
    // Rotate degree for webkit
    $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix);
  }

  @else {
    $gradients: (
      webkit-image: -webkit- + $image,
      spec-image: $image
    );
  }

  @return $gradients;
}

Version data entries

91 entries across 86 versions & 10 rubygems

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