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.3.1 core/scss/_functions.scss
bootstrap-email-1.3.0 core/scss/_functions.scss
bootstrap-email-1.2.0 core/scss/_functions.scss
bootstrap-email-1.1.7 core/scss/_functions.scss
bootstrap-email-1.1.6 core/scss/_functions.scss
bootstrap-email-1.1.5 core/scss/_functions.scss
bootstrap-email-1.1.4 core/scss/_functions.scss
bootstrap-email-1.1.3 core/scss/_functions.scss
bootstrap-email-1.1.2 core/scss/_functions.scss
bootstrap-email-1.1.1 core/scss/_functions.scss
bootstrap-email-1.1.0 core/scss/_functions.scss
bootstrap-email-1.0.2 core/scss/_functions.scss
bootstrap-email-1.0.1 core/scss/_functions.scss
bootstrap-email-1.0.0 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha4 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha3.1 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha3 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha2.1 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha2 core/scss/_functions.scss
bootstrap-email-1.0.0.alpha1.2 core/scss/_functions.scss