diff options
combine label like elements: .label, code and mark/.highlight
3 files changed, 10 insertions, 17 deletions
| -rw-r--r-- | src/labels.less | 9 | ||||
| -rw-r--r-- | src/typography.less | 11 | ||||
| -rw-r--r-- | src/variables.less | 7 |
diff --git a/src/labels.less b/src/labels.less index 3d1c457..f92f2d0 100644 --- a/src/labels.less +++ b/src/labels.less @@ -1,15 +1,8 @@ // Labels .label { background-color: @core-border-color; - border-radius: .2rem; color: lighten(@body-font-color, 20%); - display: inline-block; - font-size: 1em; - line-height: 1; - margin: -.2rem 0; - padding: .2rem .3rem; - text-align: center; - vertical-align: baseline; + .label-base; white-space: nowrap; &.label-primary { diff --git a/src/typography.less b/src/typography.less index 188ae1c..4fd681f 100644 --- a/src/typography.less +++ b/src/typography.less @@ -79,9 +79,7 @@ ol { mark, .highlight { background-color: lighten(@control-color-warning, 32%); - border-radius: .2rem; - line-height: 1.6rem; - padding: .2rem; + .label-base; } // Code @@ -96,12 +94,7 @@ pre { } code { background-color: @core-border-color; - border-radius: .2rem; - font-size: 1em; - line-height: 1.4; - margin: -.2em 0; - padding: .2em .3em; - vertical-align: middle; + .label-base; white-space: nowrap; pre & { diff --git a/src/variables.less b/src/variables.less index c56e6ef..404cd1f 100644 --- a/src/variables.less +++ b/src/variables.less @@ -30,6 +30,13 @@ border-color: darken(@color, 2%); color: @core-text-color; } +.label-base { + border-radius: .2rem; + display: inline; + font-size: 1em; + padding: .1em .3em; + vertical-align: baseline; +} .label-variant(@color) { background-color: @color; color: @core-text-color; |