Update _keys.scss

This commit is contained in:
twardoch 2020-07-27 22:58:48 +02:00
parent 1ec08b42dd
commit 9b6361c0d7

View File

@ -19,98 +19,91 @@
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER /// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS /// DEALINGS
//// ////
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Rules // Rules
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Scoped in typeset content to match specificity of regular content
// Scoped in typesetted content to match specificity of regular content
.md-typeset .keys { .md-typeset .keys {
// Keyboard key icon
// Keyboard key icon kbd::before,
kbd::before, kbd::after {
kbd::after { position: relative;
position: relative; margin: 0;
margin: 0; color: inherit;
color: inherit; -moz-osx-font-smoothing: initial;
-moz-osx-font-smoothing: initial; -webkit-font-smoothing: initial;
-webkit-font-smoothing: initial; }
} // Surrounding text
span {
// Surrounding text padding: 0 px2em(3.2px);
span { color: var(--md-default-fg-color--light);
padding: 0 px2em(3.2px); }
color: var(--md-default-fg-color--light); // Build special keys with icon on the left
} @each $name,
$code in ( // Modifiers
// Build special keys with left icon "alt": "\2387", //
@each $name, $code in ( "left-alt": "\2387", //
"right-alt": "\2387", //
// Modifiers "command": "\2318", //
"alt": "\2387", "left-command": "\2318", //
"left-alt": "\2387", "right-command": "\2318", //
"right-alt": "\2387", "control": "\2303", //
"command": "\2318", "left-control": "\2303", //
"left-command": "\2318", "right-control": "\2303", //
"right-command": "\2318", "meta": "\25C6", //
"control": "\2303", "left-meta": "\25C6", //
"left-control": "\2303", "right-meta": "\25C6", //
"right-control": "\2303", "option": "\2325", //
"meta": "\25C6", "left-option": "\2325", //
"left-meta": "\25C6", "right-option": "\2325", //
"right-meta": "\25C6", "shift": "\21E7", //
"option": "\2325", "left-shift": "\21E7", //
"left-option": "\2325", "right-shift": "\21E7", //
"right-option": "\2325", "super": "\2756", //
"shift": "\21E7", "left-super": "\2756", //
"left-shift": "\21E7", "right-super": "\2756", //
"right-shift": "\21E7", "windows": "\229E", //
"super": "\2756", "left-windows": "\229E", //
"left-super": "\2756", "right-windows": "\229E", //
"right-super": "\2756",
"windows": "\229E",
"left-windows": "\229E",
"right-windows": "\229E",
// Other keys // Other keys
"arrow-down": "\25bd", "arrow-down": "\2193", //
"arrow-left": "\25c1", "arrow-left": "\2190", //
"arrow-right": "\25b7", "arrow-right": "\2192", //
"arrow-up": "\25b3", "arrow-up": "\2191", //
"backspace": "\232B", "backspace": "\232B", //
"backtab": "\21E4", "backtab": "\21E4", //
"caps-lock": "\21EA", "caps-lock": "\21EA", //
"clear": "\2327", "clear": "\2327", //
"context-menu": "\2630", "context-menu": "\2630", //
"delete": "\2326", "delete": "\2326", //
"eject": "\23CF", "eject": "\23CF", //
"end": "\2913", "end": "\2913", //
"escape": "\238b", "escape": "\238B", //
"home": "\2912", "home": "\2912", //
"insert": "\2380", "insert": "\2380", //
"page-down": "\21df", "page-down": "\21DF", //
"page-up": "\21de", "page-up": "\21DE", //
"print-screen": "\2399" "print-screen": "\2399" //
) { ) {
.key-#{$name} { .key-#{$name} {
&::before { &::before {
padding-right: px2em(6.4px); padding-right: px2em(6.4px);
content: $code; content: $code;
} }
}
} }
} // Build special keys with icon on the right
@each $name,
// Build special keys with right icon $code in ( // Keys
@each $name, $code in ( "tab": "\21E5", //
"tab": "\21B9", "num-enter": "\2324", //
"num-enter": "\2324", "enter": "\23CE" //
"enter": "\23CE" ) {
) { .key-#{$name} {
.key-#{$name} { &::after {
&::after { padding-left: px2em(6.4px);
padding-left: px2em(6.4px); content: $code;
content: $code; }
} }
} }
} }
}