Sha256: 639a45ba04db9f7194b3597579b3927983e8103b4f2331f49de0bd3da4fa2963

Contents?: true

Size: 618 Bytes

Versions: 6

Compression:

Stored size: 618 Bytes

Contents

@charset "UTF-8";

/// Mixes a color with black.
///
/// @argument {color} $color
///
/// @argument {number (percentage)} $percent
///   The amount of black to be mixed in.
///
/// @return {color}
///
/// @example scss
///   .element {
///     background-color: shade(#ffbb52, 60%);
///   }
///
///   // CSS Output
///   .element {
///     background-color: #664a20;
///   }

@function shade(
  $color,
  $percent
) {
  @if not _is-color($color) {
    @error "`#{$color}` is not a valid color for the `$color` argument in " +
           "the `shade` mixin.";
  } @else {
    @return mix(#000, $color, $percent);
  }
}

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
bourbon-6.0.0 core/bourbon/library/_shade.scss
bourbon-5.1.0 core/bourbon/library/_shade.scss
bourbon-5.0.1 core/bourbon/library/_shade.scss
bourbon-5.0.0 core/bourbon/library/_shade.scss
dream-theme-0.1.0 _sass/bourbon/bourbon/library/_shade.scss
bourbon-5.0.0.beta.8 core/bourbon/library/_shade.scss