From 6374ad3506db0121be9dc05bdc5f62de697c0f81 Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 1 May 2015 17:53:25 -0400 Subject: [PATCH] Label now have default img styles --- src/definitions/elements/label.less | 25 +++++++++++++-------- src/themes/default/elements/label.variables | 4 +++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/definitions/elements/label.less b/src/definitions/elements/label.less index fee250c83..b82b29f6f 100755 --- a/src/definitions/elements/label.less +++ b/src/definitions/elements/label.less @@ -59,37 +59,44 @@ a.ui.label { } /* Inside Link */ -.ui.label a { +.ui.label > a { cursor: pointer; color: inherit; opacity: @linkOpacity; transition: @linkTransition; } -.ui.label a:hover { +.ui.label > a:hover { opacity: 1; } +/* Image */ +.ui.label > img { + width: auto !important; + height: @imageHeight !important; +} + /* Icon */ -.ui.label .icon { +.ui.label > .icon { width: auto; margin: 0em @iconDistance 0em 0em; } + /* Detail */ -.ui.label .detail { +.ui.label > .detail { display: inline-block; vertical-align: top; font-weight: @detailFontWeight; margin-left: @detailMargin; opacity: @detailOpacity; } -.ui.label .detail .icon { +.ui.label > .detail .icon { margin: 0em @detailIconDistance 0em 0em; } /* Removable label */ -.ui.label .close.icon, -.ui.label .delete.icon { +.ui.label > .close.icon, +.ui.label > .delete.icon { cursor: pointer; margin-right: 0em; margin-left: @deleteMargin; @@ -97,7 +104,7 @@ a.ui.label { opacity: @deleteOpacity; transition: @deleteTransition; } -.ui.label .delete.icon:hover { +.ui.label > .delete.icon:hover { opacity: 1; } @@ -105,7 +112,7 @@ a.ui.label { Group --------------------*/ -.ui.labels .label { +.ui.labels > .label { margin: 0em @groupHorizontalMargin @groupVerticalMargin 0em; } diff --git a/src/themes/default/elements/label.variables b/src/themes/default/elements/label.variables index 8bf92154b..72b08ab18 100644 --- a/src/themes/default/elements/label.variables +++ b/src/themes/default/elements/label.variables @@ -40,6 +40,8 @@ @iconDistance: 0.75em; +@imageHeight: (1em + @verticalPadding * 2); + @detailFontWeight: bold; @detailOpacity: 0.8; @detailIconDistance: 0.25em; @@ -66,7 +68,7 @@ @imageLabelImageMargin: -@verticalPadding @imageLabelTextDistance -@verticalPadding -@imageLabelTextDistance; @imageLabelImageBorderRadius: @imageLabelBorderRadius 0em 0em @imageLabelBorderRadius; -@imageLabelImageHeight: (1em + @verticalPadding * 2); +@imageLabelImageHeight: @imageHeight; @imageLabelDetailBackground: @strongTransparentBlack; @imageLabelDetailPadding: @imageLabelVerticalPadding @imageLabelHorizontalPadding;