Sha256: ebd51c8703a8b162dd5f30d6f9513990550ff01a949826c6fec3508f326cc004

Contents?: true

Size: 1.06 KB

Versions: 114

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, 1, $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-number(str-slice($first-val, 1, 1));

  @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

114 entries across 108 versions & 15 rubygems

Version Path
middleman-core-4.5.1 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.5.0 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.4.3 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.4.2 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.4.0 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.11 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.10 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.8 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.7 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-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/_linear-gradient-parser.scss
middleman-core-4.3.6 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.5 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.4 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.3 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.2 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.1 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
middleman-core-4.3.0 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
federalist-basic-report-theme-0.1.7 _sass/uswds/lib/helpers/_linear-gradient-parser.scss
uswds-jekyll-4.2.0 _sass/uswds/lib/helpers/_linear-gradient-parser.scss
middleman-core-4.3.0.rc.4 fixtures/minify-css-app/source/stylesheets/bourbon/helpers/_linear-gradient-parser.scss