Update _keys.scss

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

View File

@ -19,14 +19,11 @@
/// 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 {
@ -36,61 +33,57 @@
-moz-osx-font-smoothing: initial; -moz-osx-font-smoothing: initial;
-webkit-font-smoothing: initial; -webkit-font-smoothing: initial;
} }
// Surrounding text // Surrounding text
span { span {
padding: 0 px2em(3.2px); padding: 0 px2em(3.2px);
color: var(--md-default-fg-color--light); color: var(--md-default-fg-color--light);
} }
// Build special keys with icon on the left
// Build special keys with left icon @each $name,
@each $name, $code in ( $code in ( // Modifiers
"alt": "\2387", //
// Modifiers "left-alt": "\2387", //
"alt": "\2387", "right-alt": "\2387", //
"left-alt": "\2387", "command": "\2318", //
"right-alt": "\2387", "left-command": "\2318", //
"command": "\2318", "right-command": "\2318", //
"left-command": "\2318", "control": "\2303", //
"right-command": "\2318", "left-control": "\2303", //
"control": "\2303", "right-control": "\2303", //
"left-control": "\2303", "meta": "\25C6", //
"right-control": "\2303", "left-meta": "\25C6", //
"meta": "\25C6", "right-meta": "\25C6", //
"left-meta": "\25C6", "option": "\2325", //
"right-meta": "\25C6", "left-option": "\2325", //
"option": "\2325", "right-option": "\2325", //
"left-option": "\2325", "shift": "\21E7", //
"right-option": "\2325", "left-shift": "\21E7", //
"shift": "\21E7", "right-shift": "\21E7", //
"left-shift": "\21E7", "super": "\2756", //
"right-shift": "\21E7", "left-super": "\2756", //
"super": "\2756", "right-super": "\2756", //
"left-super": "\2756", "windows": "\229E", //
"right-super": "\2756", "left-windows": "\229E", //
"windows": "\229E", "right-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 {
@ -99,12 +92,12 @@
} }
} }
} }
// Build special keys with icon on the right
// Build special keys with right icon @each $name,
@each $name, $code in ( $code in ( // Keys
"tab": "\21B9", "tab": "\21E5", //
"num-enter": "\2324", "num-enter": "\2324", //
"enter": "\23CE" "enter": "\23CE" //
) { ) {
.key-#{$name} { .key-#{$name} {
&::after { &::after {