Sha256: 164c9d9db443093f3b134cd71fbed1cd6de1b55fc3bf6281e8f04a43ddcc5295

Contents?: true

Size: 552 Bytes

Versions: 22

Compression:

Stored size: 552 Bytes

Contents

@mixin color-contrast($color) {
  $r: red($color);
  $g: green($color);
  $b: blue($color);

  $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;

  @if ($yiq >= 150) {
    color: #111111;
  } @else {
    color: $white;
  }
}

@function tint-color($color, $level) {
  @return mix(white, $color, $level);
}

@function shade-color($color, $level) {
  @return mix(black, $color, $level);
}

@function strip-unit($number) {
  @if type-of($number) == 'number' and not unitless($number) {
    @return $number / ($number * 0 + 1);
  }

  @return $number;
}

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bootstrap-email-1.0.0.alpha1.1 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha1 core/scss/_functions.scss