From 9fa53c02d9b23861618591474f0475c4706b3a63 Mon Sep 17 00:00:00 2001 From: simurai Date: Wed, 2 Oct 2019 10:50:16 +0900 Subject: [PATCH] Import kbd form /base --- src/base/base.scss | 16 ---------------- src/base/index.scss | 1 + src/base/kbd.scss | 15 +++++++++++++++ src/markdown/markdown-body.scss | 16 ++-------------- 4 files changed, 18 insertions(+), 30 deletions(-) create mode 100644 src/base/kbd.scss diff --git a/src/base/base.scss b/src/base/base.scss index 1557b1e8..b6598334 100644 --- a/src/base/base.scss +++ b/src/base/base.scss @@ -48,22 +48,6 @@ hr, @include clearfix(); } -// Keyboard shortcuts - -kbd { - display: inline-block; - padding: ($spacer-1 - 1) ($spacer-1 + 1); - font: 11px $mono-font; - line-height: 10px; - color: $gray-700; - vertical-align: middle; - background-color: $bg-gray-light; - border: $border-style $border-width $border-gray-dark; - border-bottom-color: $border-gray-dark; - border-radius: $border-radius; - box-shadow: inset 0 -1px 0 $border-gray-dark; -} - // // Remove most spacing between table cells. // diff --git a/src/base/index.scss b/src/base/index.scss index e4563c75..2c7f8b99 100644 --- a/src/base/index.scss +++ b/src/base/index.scss @@ -2,4 +2,5 @@ @import "./normalize.scss"; @import "./base.scss"; +@import "./kbd.scss"; @import "./typography-base.scss"; diff --git a/src/base/kbd.scss b/src/base/kbd.scss new file mode 100644 index 00000000..cb438805 --- /dev/null +++ b/src/base/kbd.scss @@ -0,0 +1,15 @@ +// Keyboard shortcuts + +kbd { + display: inline-block; + padding: ($spacer-1 - 1) ($spacer-1 + 1); + font: 11px $mono-font; + line-height: 10px; + color: $gray-700; + vertical-align: middle; + background-color: $bg-gray-light; + border: $border-style $border-width $border-gray-dark; + border-bottom-color: $border-gray-dark; + border-radius: $border-radius; + box-shadow: inset 0 -1px 0 $border-gray-dark; +} diff --git a/src/markdown/markdown-body.scss b/src/markdown/markdown-body.scss index 37a3ee0c..7b152a76 100644 --- a/src/markdown/markdown-body.scss +++ b/src/markdown/markdown-body.scss @@ -10,6 +10,8 @@ line-height: $body-line-height; word-wrap: break-word; + @import "../base/kbd.scss"; // adds support for keyboard shortcuts + // Clearfix on the markdown body &::before { display: table; @@ -90,18 +92,4 @@ margin-bottom: 0; } } - - kbd { - display: inline-block; - padding: ($spacer-1 - 1) ($spacer-1 + 1); - font: 11px $mono-font; - line-height: 10px; - color: $gray-700; - vertical-align: middle; - background-color: $bg-gray-light; - border: $border-style $border-width $border-gray-dark; - border-bottom-color: $border-gray-dark; - border-radius: $border-radius; - box-shadow: inset 0 -1px 0 $border-gray-dark; - } }