Sha256: cc85fd144c032f39b0b9a29bb883b064e7965058b384f9db911aafcaa8585e77

Contents?: true

Size: 1.3 KB

Versions: 114

Compression:

Stored size: 1.3 KB

Contents

//************************************************************************//
// Background-image property for adding multiple background images with
// gradients, or for stringing multiple gradients together.
//************************************************************************//

@mixin background-image($images...) {
  $webkit-images: ();
  $spec-images: ();

  @each $image in $images {
    $webkit-image: ();
    $spec-image: ();

    @if (type-of($image) == string) {
      $url-str:       str-slice($image, 1, 3);
      $gradient-type: str-slice($image, 1, 6);

      @if $url-str == "url" {
        $webkit-image: $image;
        $spec-image:   $image;
      }

      @else if $gradient-type == "linear" {
        $gradients: _linear-gradient-parser($image);
        $webkit-image:  map-get($gradients, webkit-image);
        $spec-image:    map-get($gradients, spec-image);
      }

      @else if $gradient-type == "radial" {
        $gradients: _radial-gradient-parser($image);
        $webkit-image: map-get($gradients, webkit-image);
        $spec-image:   map-get($gradients, spec-image);
      }
    }

    $webkit-images: append($webkit-images, $webkit-image, comma);
    $spec-images:   append($spec-images,   $spec-image,   comma);
  }

  background-image: $webkit-images;
  background-image: $spec-images;
}

Version data entries

114 entries across 108 versions & 15 rubygems

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