Sha256: 22392697341d7890115ae5cf4272a8720b48ad5952c3f973dabdce30da00639b

Contents?: true

Size: 1.45 KB

Versions: 37

Compression:

Stored size: 1.45 KB

Contents

@function _linear-gradient-parser($image) {
  @if $output-bourbon-deprecation-warnings == true {
    @warn "[Bourbon] [Deprecation] `_linear-gradient-parser` is " +
    "deprecated and will be removed in 5.0.0.";
  }

  $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
  $output-bourbon-deprecation-warnings: false !global;

  $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
    );
  }

  $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;

  @return $gradients;
}

Version data entries

37 entries across 37 versions & 6 rubygems

Version Path
cortex-0.1.3 spec/dummy/node_modules/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss
english_tea-0.6.2 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.6.1 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.6.0 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.5.3 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.5.2 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.5.1 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.5.0 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.4.0 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
english_tea-0.3.0 vendor/assets/stylesheets/bourbon/helpers/_linear-gradient-parser.scss
wayfarer-jruby-0.0.3 docs/_sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
wayfarer-0.0.3 docs/_sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
wayfarer-jruby-0.0.2 docs/_sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
wayfarer-jruby-0.0.1 docs/_sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
bourbon-4.3.4 app/assets/stylesheets/helpers/_linear-gradient-parser.scss
dta_rapid-0.3.5 _sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
dta_rapid-0.3.4 _sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
dta_rapid-0.3.3 _sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
dta_rapid-0.3.2 _sass/vendor/bourbon/helpers/_linear-gradient-parser.scss
dta_rapid-0.3.1 _sass/vendor/bourbon/helpers/_linear-gradient-parser.scss