Sha256: 1bd28602097acbc48b3ea6ca360fa49d966879aef9fa555e605dd25c01dfe460

Contents?: true

Size: 1.42 KB

Versions: 38

Compression:

Stored size: 1.42 KB

Contents

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

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

  $is-spec-syntax: str-index($first-val, "at");

  @if $is-spec-syntax and $is-spec-syntax > 1 {
    $keyword: str-slice($first-val, 1, $is-spec-syntax - 2);
    $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
    $pos: append($pos, $keyword, comma);

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

  @else if $is-spec-syntax == 1 {
    $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));

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

  @else if str-index($image, "cover") or str-index($image, "contain") {
    @warn "Radial-gradient needs to be updated to conform to latest spec.";

    $gradients: (
      webkit-image: null,
      spec-image: $image
    );
  }

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

  @return $gradients;
}

Version data entries

38 entries across 38 versions & 6 rubygems

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