Sha256: d15ad3d334fbf122a51288f77737839589e15344184f471df38597fef5ecb1b2

Contents?: true

Size: 1.06 KB

Versions: 17

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-number(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

17 entries across 16 versions & 7 rubygems

Version Path
soffes-blog-jekyll-0.2.0 _sass/bourbon/helpers/_linear-gradient-parser.scss
soffes-blog-jekyll-0.1.0 _sass/bourbon/helpers/_linear-gradient-parser.scss
va_common-0.1.0 app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss
us_web_design_standards-0.0.2 assets/_scss/lib/bourbon/helpers/_linear-gradient-parser.scss
us_web_design_standards-0.0.2 app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss
us_web_design_standards-0.0.0 assets/_scss/lib/bourbon/helpers/_linear-gradient-parser.scss
solidus_backend-1.0.0.pre3 vendor/bundle/gems/bourbon-4.2.3/app/assets/stylesheets/helpers/_linear-gradient-parser.scss
nesta-contentfocus-extensions-0.0.3 assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
nesta-contentfocus-extensions-0.0.2 assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
solidus_backend-1.0.0.pre2 vendor/bundle/gems/bourbon-4.2.3/app/assets/stylesheets/helpers/_linear-gradient-parser.scss
mifflin-0.1.1 vendor/assets/bower_components/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss
bourbon-4.2.3 app/assets/stylesheets/helpers/_linear-gradient-parser.scss
bourbon-4.2.2 app/assets/stylesheets/helpers/_linear-gradient-parser.scss
bourbon-4.2.1 app/assets/stylesheets/helpers/_linear-gradient-parser.scss
bourbon-4.2.0 app/assets/stylesheets/helpers/_linear-gradient-parser.scss
bourbon-4.2.0.beta app/assets/stylesheets/helpers/_linear-gradient-parser.scss
bourbon-4.2.0.pre app/assets/stylesheets/helpers/_linear-gradient-parser.scss