Sha256: 874bb526427901b5e90c3b5e324b751c156302b7dd2115a261688da91e2e30bc

Contents?: true

Size: 1.28 KB

Versions: 353

Compression:

Stored size: 1.28 KB

Contents

@mixin linear-gradient($pos, $G1, $G2: null,
                       $G3: null, $G4: null,
                       $G5: null, $G6: null,
                       $G7: null, $G8: null,
                       $G9: null, $G10: null,
                       $fallback: null) {
  // Detect what type of value exists in $pos
  $pos-type: type-of(nth($pos, 1));
  $pos-spec: null;
  $pos-degree: null;

  // If $pos is missing from mixin, reassign vars and add default position
  @if ($pos-type == color) or (nth($pos, 1) == "transparent")  {
    $G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5;
     $G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos;
     $pos: null;
  }

  @if $pos {
    $positions: _linear-positions-parser($pos);
    $pos-degree: nth($positions, 1);
    $pos-spec:   nth($positions, 2);
  }

  $full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;

  // Set $G1 as the default fallback color
  $fallback-color: nth($G1, 1);

  // If $fallback is a color use that color as the fallback color
  @if (type-of($fallback) == color) or ($fallback == "transparent") {
    $fallback-color: $fallback;
  }

  background-color: $fallback-color;
  background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome
  background-image: unquote("linear-gradient(#{$pos-spec}#{$full})");
}

Version data entries

353 entries across 342 versions & 11 rubygems

Version Path
card-mod-bootstrap-0.18.1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.18.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.17.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.16.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.6 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.5 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.4 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.3 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.1.2 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.2.pre1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.1.1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.1 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
card-mod-bootstrap-0.15.0 vendor/select2/docs/themes/learn2/scss/vendor/bourbon/css3/_linear-gradient.scss
portfolio-jekyll-theme-2.0.0 _sass/1-tools/bourbon/css3/_linear-gradient.scss
hanuman-0.3.0 _sass/bourbon/css3/_linear-gradient.scss
hanuman-0.2.0 _sass/bourbon/css3/_linear-gradient.scss
hanuman-0.1.0 _sass/bourbon/css3/_linear-gradient.scss
wrgem-0.0.55 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/css3/_linear-gradient.scss
wrgem-0.0.54 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/css3/_linear-gradient.scss
wrgem-0.0.53 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/css3/_linear-gradient.scss