//
// KEYS.less
//
// A simple stylesheet for rendering beautiful keyboard-style elements.
//
// Author:  Michael Hüneburg
// Website: http://michaelhue.com/keyscss
// GitHub:  https://github.com/michaelhue/keyscss
// License: MIT License (see LICENSE.txt)
//

// Base mixin:
.keycap()
{
    display: inline;
    display: inline-block;
    white-space: nowrap;
    min-width: 1em;
    padding: .3em .4em .2em .3em;

    //font: normal .85em/1 "Lucida Grande", Lucida, Arial, sans-serif;
    font-style: normal;
    // font-size: .85em;
    // line-height: 1;
    font-family: "Lucida Grande", Lucida, Arial, sans-serif;

    text-align: center;
    text-decoration: none;
    border-radius: .3em;
    border: none;
}

.keycap-dark()
{
    .keycap();

    background-color: rgb(80, 80, 80);
    background-color: gradient(linear, left top, left bottom, from(rgb(60, 60, 60)), to(rgb(80, 80, 80)));
    color: rgb(250, 250, 250);
    text-shadow: -1px -1px 0 rgb(70, 70, 70);
    box-shadow: inset 0 0 1px rgb(150, 150, 150), inset 0 -.05em .4em rgb(80, 80, 80), 0 .1em 0 rgb(30, 30, 30), 0 .1em .1em rgba(0, 0, 0, .3);
}

.keycap-light()
{
    .keycap();

    background-color: rgb(250, 250, 250);
    background-color: gradient(linear, left top, left bottom, from(rgb(210, 210, 210)), to(rgb(255, 255, 255)));
    color:  rgb(50, 50, 50);
    text-shadow: 0 0 2px rgb(255, 255, 255);
    box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9);
}

// keys styled a la StackOverflow anno 2017
.keycap-stackoverflow()
{
    .keycap();

    margin: 0 .1em;
    padding: .1em .6em;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    //font-size: 11px;
    line-height: 1.4;
    color: #242729;
    text-shadow: 0 1px 0 #FFF;
    background-color: #e1e3e5;
    border: 1px solid #adb3b9;
    border-radius: (3em / 11);
    box-shadow: 0 1px 0 rgba(12,13,14,0.2), 0 0 0 2px #FFF inset;
}

// keys styled a la GitHub anno 2017
.keycap-github()
{
    .keycap();

    padding: (3em / 11) (5em / 11);
    font-size: (100% * 11 / 16);
    line-height: (10 / 11);         // 10px at font-size:11px 
    color: #444d56;
    vertical-align: middle;
    background-color: #fafbfc;
    border: solid 1px #c6cbd1;
    border-bottom-color: #959da5;
    border-radius: (3em / 11);
    box-shadow: inset 0 -1px 0 #959da5;

    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

    box-sizing: border-box;

    // reset text-shadow set by other macros above when those are 
    // used as default KBD style, as in the keys CSS file: `keys.less`:
    text-shadow: none;
}
