Sha256: 4720cce388be02126b4f2791850ae73dcd5602a99fff6e5d93db85036511a579

Contents?: true

Size: 1.68 KB

Versions: 33

Compression:

Stored size: 1.68 KB

Contents

@import "global";

//
// @variables
//
$include-html-type-classes: $include-html-classes !default;

// We use these to control text styles.
$keystroke-font: "Consolas", "Menlo", "Courier", monospace !default;
$keystroke-font-size: rem-calc(14) !default;
$keystroke-font-color: #222 !default;
$keystroke-font-color-alt: #fff !default;
$keystroke-function-factor: 7% !default;

// We use this to control keystroke padding.
$keystroke-padding: rem-calc(2 4 0) !default;

// We use these to control background and border styles.
$keystroke-bg: darken(#fff, $keystroke-function-factor) !default;
$keystroke-border-style: solid !default;
$keystroke-border-width: 1px !default;
$keystroke-border-color: darken($keystroke-bg, $keystroke-function-factor) !default;
$keystroke-radius: $global-radius !default;

//
// @mixins
//
// We use this mixin to create keystroke styles.
// $bg - Default: $keystroke-bg || darken(#fff, $keystroke-function-factor) !default;
@mixin keystroke($bg:$keystroke-bg) {
  // This find the lightness percentage of the background color.
  $bg-lightness: lightness($bg);

  background-color: $bg;
  border-color: darken($bg, $keystroke-function-factor);

  // We adjust the font color based on the brightness of the background.
  @if $bg-lightness > 70% { color: $keystroke-font-color; }
  @else { color: $keystroke-font-color-alt; }

  border-style: $keystroke-border-style;
  border-width: $keystroke-border-width;
  margin: 0;
  font-family: $keystroke-font;
  font-size: $keystroke-font-size;
  padding: $keystroke-padding;
}

@include exports("keystroke") {
  @if $include-html-type-classes  {
    .keystroke,
    kbd {
      @include keystroke;
      @include radius($keystroke-radius);
    }
  }
}

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
publish_my_data-1.3.25 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.24 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.23 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.22 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.21 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.20 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.19 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.18 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.17 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.16 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.15 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.14 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.13 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.12 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.11 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.10 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.9 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.8 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.7 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss
publish_my_data-1.3.6 app/assets/stylesheets/vendor/zurb/foundation/components/_keystrokes.scss