Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit6cfe532cf372e82f3deabb703a40d6a1b069bace (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2016-04-20 18:15:02 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2016-04-20 18:15:02 +0800
Files9da1a1c9f91ba17f35b33ec931c54c25489b00d7 /src
Spectre-Dark-Gruvbox-6cfe532cf372e82f3deabb703a40d6a1b069bace.tar
Spectre-Dark-Gruvbox-6cfe532cf372e82f3deabb703a40d6a1b069bace.tar.gz
Spectre-Dark-Gruvbox-6cfe532cf372e82f3deabb703a40d6a1b069bace.zip
Parent7b98b9978e09d4f9d73809e03ba619f701581e65 (diff)
combine label like elements: .label, code and mark/.highlight
3 files changed, 10 insertions, 17 deletions
-rw-r--r--src/labels.less9
-rw-r--r--src/typography.less11
-rw-r--r--src/variables.less7
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;