Sha256: 50b61c64e4dd6bb50b0d66dfca3b4c767da2845fd3af33a327f8c9f411331496

Contents?: true

Size: 804 Bytes

Versions: 23

Compression:

Stored size: 804 Bytes

Contents

@function linear-gradient($pos: top, $G1: false, $G2: false,
                       $G3: false, $G4: false,
                       $G5: false, $G6: false,
                       $G7: false, $G8: false,
                       $G9: false, $G10: false) {

  // Detect what type of value exists in $pos
  $pos-type: type-of(nth($pos, 1));

  // 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: top; // Default position
  }

  $type: linear;
  $gradient: compact($pos, $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
  $type-gradient: append($type, $gradient, comma);

  @return $type-gradient;
}

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
bourbon-compass-2.1.3 stylesheets/bourbon/functions/_linear-gradient.scss
bourbon-2.1.3 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-compass-2.1.2 stylesheets/bourbon/functions/_linear-gradient.scss
bourbon-2.1.2 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-compass-2.1.1.0 stylesheets/bourbon/functions/_linear-gradient.scss
bourbon-2.1.1 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-2.1.0 app/assets/stylesheets/functions/_linear-gradient.scss
app_sleuth-0.0.1.pre lib/app_sleuth/server/assets/sass/mixins/functions/_linear-gradient.scss
bourbon-2.0.0.rc1 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.4.0 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.3.6 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.3.5 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.3.4 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.3.3 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.3.2 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.3.0 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.2.0 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.1.0 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.0.4 app/assets/stylesheets/functions/_linear-gradient.scss
bourbon-1.0.3 app/assets/stylesheets/functions/_linear-gradient.scss