Sha256: fd1dea42f53c988e2d7a879c674bb5843e5cdc71e9646edcaba2f0f238478de4

Contents?: true

Size: 1.25 KB

Versions: 114

Compression:

Stored size: 1.25 KB

Contents

@function _radial-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));

  $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

114 entries across 108 versions & 15 rubygems

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