/* * # Semantic - Label * http://github.com/semantic-org/semantic-ui/ * * * Copyright 2014 Contributor * Released under the MIT license * http://opensource.org/licenses/MIT * */ /******************************* Theme *******************************/ @type : 'element'; @element : 'label'; @import '../../semantic.config'; /******************************* Label *******************************/ .ui.label { display: inline-block; vertical-align: @verticalAlign; line-height: 1; margin: @verticalMargin @horizontalMargin; background-color: @backgroundColor; border-color: @backgroundColor; background-image: @backgroundImage; padding: @verticalPadding @horizontalPadding; color: @labelTextColor; text-transform: @textTransform; font-weight: @fontWeight; border-radius: @borderRadius; box-sizing: border-box; transition: background 0.1s linear ; } .ui.label:first-child { margin-left: 0em; } .ui.label:last-child { margin-right: 0em; } /* Link */ a.ui.label { cursor: pointer; } /* Inside Link */ .ui.label a { cursor: pointer; color: inherit; opacity: @linkOpacity; transition: @labelTransitionDuration opacity @labelTransitionEasing; } .ui.label a:hover { opacity: 1; } /* Icon */ .ui.label .icon { width: auto; margin: 0em @iconDistance 0em 0em; } /* Detail */ .ui.label .detail { display: inline-block; margin-left: @detailMargin; font-weight: bold; opacity: @detailOpacity; } .ui.label .detail .icon { margin: 0em @detailIconDistance 0em 0em; } /* Removable label */ .ui.label .close.icon, .ui.label .delete.icon { cursor: pointer; margin-right: 0em; margin-left: @deleteMargin; opacity: @linkOpacity; transition: background 0.1s linear ; } .ui.label .delete.icon:hover { opacity: 1; } /*------------------- Group --------------------*/ .ui.labels .label { margin: 0em @groupHorizontalMargin @groupVerticalMargin 0em; } /*------------------- Coupling --------------------*/ /* Padding on next content after a label */ .ui.top.attached.label:first-child + * { margin-top: @attachedSegmentPadding; } .ui.bottom.attached.label:first-child ~ :last-child { margin-top: 0em; margin-bottom: @attachedSegmentPadding; } /******************************* Types *******************************/ .ui.image.label { width: auto !important; margin-top: 0em; margin-bottom: 0em; max-width: 9999px; vertical-align: baseline; text-transform: none; background: @imageLabelBackground; padding: @imageLabelPadding; border-radius: @imageLabelBorderRadius; box-shadow: @imageLabelBoxShadow; } .ui.image.label img { display: inline-block; vertical-align: top; height: @imageLabelImageHeight; margin: @imageLabelImageMargin; border-radius: @imageLabelBorderRadius; } .ui.image.label .detail { background: @imageLabelDetailBackground; margin: @imageLabelDetailMargin; padding: @imageLabelDetailPadding; border-radius: 0em @imageLabelBorderRadius @imageLabelBorderRadius 0em; } /*------------------- Tag --------------------*/ .ui.tag.labels .label, .ui.tag.label { margin-left: 1em; position: relative; padding-left: @tagHorizontalPadding; padding-right: @tagHorizontalPadding; border-radius: 0em @borderRadius @borderRadius 0em; } .ui.tag.labels .label:before, .ui.tag.label:before { position: absolute; top: @tagTriangleTopOffset; right: @tagTriangleRightOffset; content: ''; background-color: @backgroundColor; background-image: @backgroundImage; width: @tagTriangleSize; height: @tagTriangleSize; transform: translateY(-50%) translateX(50%) rotate(-45deg); transition: background 0.1s linear ; } .ui.tag.labels .label:after, .ui.tag.label:after { position: absolute; content: ''; top: 50%; left: -(@tagCircleSize / 2); margin-top: -(@tagCircleSize / 2); background-color: @tagCircleColor !important; width: @tagCircleSize; height: @tagCircleSize; box-shadow: @tagCircleBoxShadow; border-radius: @circularRadius; } /*------------------- Corner Label --------------------*/ .ui.corner.label { position: absolute; top: 0em; right: 0em; z-index: 10; margin: 0em; width: @cornerTriangleSize; height: @cornerTriangleSize; padding: 0em; text-align: center; transition: color @labelTransitionDuration @labelTransitionEasing; } /* Icon Label */ .ui.corner.label{ background-color: transparent !important; } .ui.corner.label:after { position: absolute; content: ""; right: 0em; top: 0em; z-index: -1; width: 0em; height: 0em; background-color: transparent !important; border-top: 0em solid transparent; border-right: @cornerTriangleSize solid transparent; border-bottom: @cornerTriangleSize solid transparent; border-left: 0em solid transparent; border-right-color: inherit; transition: border-color @labelTransitionDuration @labelTransitionEasing; } .ui.corner.label .icon { position: relative; top: @cornerIconTopOffset; left: @cornerIconLeftOffset; font-size: @cornerIconSize; margin: 0em; } /* Text Label .ui.text.corner.label { font-weight: @cornerTextWeight; text-align: center; padding: 0.25em 0; top: 1.1em; transform: rotate(45deg); width: 4em; height: auto; } .ui.left.text.corner.label { transform: rotate(-45deg); } .ui.text.corner.label:before, .ui.text.corner.label:after { position: absolute; content: ''; top: 0em; width: 0em; height: 0em; } .ui.text.corner.label:before { left: auto; right: 100%; border-top: 0em solid transparent; border-right-width: @ribbonTriangleSize; border-right-color: inherit; border-right-style: solid; border-bottom: @ribbonTriangleSize solid transparent; border-left: 0em solid transparent; } .ui.text.corner.label:after { left: 100%; right: auto; border-top: 0em solid transparent; border-right-width: @ribbonTriangleSize; border-right-color: inherit; border-right-style: solid; border-bottom: @ribbonTriangleSize solid transparent; border-left: 0em solid transparent; } */ /* Left Corner */ .ui.left.corner.label, .ui.left.corner.label:after { right: auto; left: 0em; } .ui.left.corner.label:after { border-top: @cornerTriangleSize solid transparent; border-right: @cornerTriangleSize solid transparent; border-bottom: 0em solid transparent; border-left: 0em solid transparent; border-top-color: inherit; } .ui.left.corner.label .icon { left: -@cornerIconLeftOffset; } /* Segment */ .ui.segment > .ui.corner.label { top: -1px; right: -1px; } .ui.segment > .ui.left.corner.label { right: auto; left: -1px; } /* Input */ .ui.input > .ui.corner.label { top: 1px; right: 1px; } .ui.input > .ui.right.corner.label { right: auto; left: 1px; } /*------------------- Ribbon --------------------*/ .ui.ribbon.label { position: relative; margin: 0em; left: -@ribbonDistance; padding-left: @ribbonDistance; border-radius: 0em @borderRadius @borderRadius 0em; border-color: @ribbonShadowColor; } .ui.ribbon.label:after { position: absolute; content: ""; top: 100%; left: 0%; background-color: transparent !important; border-top: 0em solid transparent; border-right-width: @ribbonTriangleSize; border-right-color: inherit; border-right-style: solid; border-bottom: @ribbonTriangleSize solid transparent; border-left: 0em solid transparent; width: 0em; height: 0em; } /*------------------- Attached --------------------*/ .ui.top.attached.label, .ui.attached.label { width: 100%; position: absolute; margin: 0em; top: 0em; left: 0em; padding: @attachedVerticalPadding @attachedHorizontalPadding; border-radius: @borderRadius @borderRadius 0em 0em; } .ui.bottom.attached.label { top: auto; bottom: 0em; border-radius: 0em 0em @borderRadius @borderRadius; } .ui.top.left.attached.label { width: auto; margin-top: 0em !important; border-radius: @borderRadius 0em @borderRadius 0em; } .ui.top.right.attached.label { width: auto; left: auto; right: 0em; border-radius: 0em @borderRadius 0em @borderRadius; } .ui.bottom.left.attached.label { width: auto; top: auto; bottom: 0em; border-radius: 0em 0em @borderRadius @borderRadius ; } .ui.bottom.right.attached.label { top: auto; bottom: 0em; left: auto; right: 0em; width: auto; border-radius: @borderRadius 0em @borderRadius 0em; } /******************************* States *******************************/ /*------------------- Disabled --------------------*/ .ui.label.disabled { opacity: 0.5; } /*------------------- Hover --------------------*/ a.ui.labels .label:hover, a.ui.label:hover { background-color: @labelHoverBackgroundColor; border-color: @labelHoverBackgroundColor; background-image: @labelHoverBackgroundImage; color: @labelHoverTextColor; } .ui.labels a.label:hover:before, a.ui.label:hover:before { background-color: @labelHoverBackgroundColor; background-image: @labelHoverBackgroundImage; color: @labelHoverTextColor; } /*------------------- Visible --------------------*/ .ui.labels.visible .label, .ui.label.visible { display: inline-block !important; } /*------------------- Hidden --------------------*/ .ui.labels.hidden .label, .ui.label.hidden { display: none !important; } /******************************* Variations *******************************/ /*------------------- Colors --------------------*/ /*--- Black ---*/ .ui.black.labels .label, .ui.black.label { background-color: @black !important; border-color: @black !important; color: @invertedTextColor !important; } .ui.labels .black.label:before, .ui.black.labels .label:before, .ui.black.label:before { background-color: @black !important; } a.ui.black.labels .label:hover, a.ui.black.label:hover { background-color: @blackHover !important; border-color: @blackHover !important; } .ui.labels a.black.label:hover:before, .ui.black.labels a.label:hover:before, a.ui.black.label:hover:before { background-color: @blackHover !important; } .ui.black.corner.label, .ui.black.corner.label:hover { background-color: transparent !important; } .ui.black.ribbon.label { border-color: @blackRibbonShadow !important; } /*--- Blue ---*/ .ui.blue.labels .label, .ui.blue.label { background-color: @blue !important; border-color: @blue !important; color: @invertedTextColor !important; } .ui.labels .blue.label:before, .ui.blue.labels .label:before, .ui.blue.label:before { background-color: @blue !important; } a.ui.blue.labels .label:hover, .ui.blue.labels a.label:hover, a.ui.blue.label:hover { background-color: @blueHover !important; border-color: @blueHover !important; color: @invertedTextColor !important; } .ui.labels a.blue.label:hover:before, .ui.blue.labels a.label:hover:before, a.ui.blue.label:hover:before { background-color: @blueHover !important; } .ui.blue.corner.label, .ui.blue.corner.label:hover { background-color: transparent !important; } .ui.blue.ribbon.label { border-color: @blueRibbonShadow !important; } /*--- Green ---*/ .ui.green.labels .label, .ui.green.label { background-color: @green !important; border-color: @green !important; color: @invertedTextColor !important; } .ui.labels .green.label:before, .ui.green.labels .label:before, .ui.green.label:before { background-color: @green !important; } a.ui.green.labels .label:hover, a.ui.green.label:hover { background-color: @greenHover !important; border-color: @greenHover !important; } .ui.labels a.green.label:hover:before, .ui.green.labels a.label:hover:before, a.ui.green.label:hover:before { background-color: @greenHover !important; } .ui.green.corner.label, .ui.green.corner.label:hover { background-color: transparent !important; } .ui.green.ribbon.label { border-color: @greenRibbonShadow !important; } /*--- Orange ---*/ .ui.orange.labels .label, .ui.orange.label { background-color: @orange !important; border-color: @orange !important; color: @invertedTextColor !important; } .ui.labels .orange.label:before, .ui.orange.labels .label:before, .ui.orange.label:before { background-color: @orange !important; } a.ui.orange.labels .label:hover, .ui.orange.labels a.label:hover, a.ui.orange.label:hover { background-color: @orangeHover !important; border-color: @orangeHover !important; color: @invertedTextColor !important; } .ui.labels a.orange.label:hover:before, .ui.orange.labels a.label:hover:before, a.ui.orange.label:hover:before { background-color: @orangeHover !important; } .ui.orange.corner.label, .ui.orange.corner.label:hover { background-color: transparent !important; } .ui.orange.ribbon.label { border-color: @orangeRibbonShadow !important; } /*--- Pink ---*/ .ui.pink.labels .label, .ui.pink.label { background-color: @pink !important; border-color: @pink !important; color: @invertedTextColor !important; } .ui.labels .pink.label:before, .ui.pink.labels .label:before, .ui.pink.label:before { background-color: @pink !important; } a.ui.pink.labels .label:hover, .ui.pink.labels a.label:hover, a.ui.pink.label:hover { background-color: @pinkHover !important; border-color: @pinkHover !important; color: @invertedTextColor !important; } .ui.labels a.pink.label:hover:before, .ui.pink.labels a.label:hover:before, a.ui.pink.label:hover:before { background-color: @pinkHover !important; } .ui.pink.corner.label, .ui.pink.corner.label:hover { background-color: transparent !important; } .ui.pink.ribbon.label { border-color: @pinkRibbonShadow !important; } /*--- Purple ---*/ .ui.purple.labels .label, .ui.purple.label { background-color: @purple !important; border-color: @purple !important; color: @invertedTextColor !important; } .ui.labels .purple.label:before, .ui.purple.labels .label:before, .ui.purple.label:before { background-color: @purple !important; } a.ui.purple.labels .label:hover, .ui.purple.labels a.label:hover, a.ui.purple.label:hover { background-color: @purpleHover !important; border-color: @purpleHover !important; color: @invertedTextColor !important; } .ui.labels a.purple.label:hover:before, .ui.purple.labels a.label:hover:before, a.ui.purple.label:hover:before { background-color: @purpleHover !important; } .ui.purple.corner.label, .ui.purple.corner.label:hover { background-color: transparent !important; } .ui.purple.ribbon.label { border-color: @purpleRibbonShadow !important; } /*--- Red ---*/ .ui.red.labels .label, .ui.red.label { background-color: @red !important; border-color: @red !important; color: @invertedTextColor !important; } .ui.labels .red.label:before, .ui.red.labels .label:before, .ui.red.label:before { background-color: @red !important; } .ui.red.corner.label, .ui.red.corner.label:hover { background-color: transparent !important; } a.ui.red.labels .label:hover, a.ui.red.label:hover{ background-color: @redHover !important; border-color: @redHover !important; color: @invertedTextColor !important; } .ui.labels a.red.label:hover:before, .ui.red.labels a.label:hover:before, a.ui.red.label:hover:before { background-color: @redHover !important; } .ui.red.ribbon.label { border-color: @redRibbonShadow !important; } /*--- Teal ---*/ .ui.teal.labels .label, .ui.teal.label { background-color: @teal !important; border-color: @teal !important; color: @invertedTextColor !important; } .ui.labels .teal.label:before, .ui.teal.labels .label:before, .ui.teal.label:before { background-color: @teal !important; } a.ui.teal.labels .label:hover, .ui.teal.labels a.label:hover, a.ui.teal.label:hover { background-color: @tealHover !important; border-color: @tealHover !important; color: @invertedTextColor !important; } .ui.labels a.teal.label:hover:before, .ui.teal.labels a.label:hover:before, a.ui.teal.label:hover:before { background-color: @tealHover !important; } .ui.teal.corner.label, .ui.teal.corner.label:hover { background-color: transparent !important; } .ui.teal.ribbon.label { border-color: @tealRibbonShadow !important; } /*--- Yellow ---*/ .ui.yellow.labels .label, .ui.yellow.label { background-color: @yellow !important; border-color: @yellow !important; color: @invertedTextColor !important; } .ui.labels .yellow.label:before, .ui.yellow.labels .label:before, .ui.yellow.label:before { background-color: @yellow !important; } a.ui.yellow.labels .label:hover, .ui.yellow.labels a.label:hover, a.ui.yellow.label:hover { background-color: @yellowHover !important; border-color: @yellowHover !important; color: @invertedTextColor !important; } .ui.labels a.yellow.label:hover:before, .ui.yellow.labels a.label:hover:before, a.ui.yellow.label:hover:before { background-color: @yellowHover !important; } .ui.yellow.corner.label, .ui.yellow.corner.label:hover { background-color: transparent !important; } .ui.yellow.ribbon.label { border-color: @yellowRibbonShadow !important; } /*------------------- Fluid --------------------*/ .ui.label.fluid, .ui.fluid.labels > .label { width: 100%; box-sizing: border-box; } /*------------------- Inverted --------------------*/ .ui.inverted.labels .label, .ui.inverted.label { color: @invertedTextColor !important; } /*------------------- Horizontal --------------------*/ .ui.horizontal.labels .label, .ui.horizontal.label { margin: 0em @horizontalLabelMargin 0em 0em; padding: @horizontalLabelVerticalPadding @horizontalPadding; min-width: @horizontalLabelMinWidth; text-align: center; } /*------------------- Circular --------------------*/ .ui.circular.labels .label, .ui.circular.label { min-width: @circularMinSize; min-height: @circularMinSize; padding: @circularPadding !important; line-height: 1em; text-align: center; border-radius: @circularRadius; } .ui.empty.circular.labels .label, .ui.empty.circular.label { min-width: 0em; min-height: 0em; overflow: hidden; width: @emptyCircleSize; height: @emptyCircleSize; vertical-align: baseline; } /*------------------- Pointing --------------------*/ .ui.pointing.label { position: relative; } .ui.attached.pointing.label { position: absolute; } .ui.pointing.label:before { position: absolute; content: ''; width: @pointingTriangleSize; height: @pointingTriangleSize; background-image: none; transform: rotate(45deg); z-index: 2; transition: background 0.1s linear ; } /*--- Above ---*/ .ui.pointing.label:before { background-color: @backgroundColor; background-image: @backgroundImage; } .ui.pointing.label, .ui.pointing.above.label { margin-top: 1em; } .ui.pointing.label:before, .ui.pointing.above.label:before { margin-left: -@pointingTriangleOffset; top: -@pointingTriangleOffset; left: 50%; } /*--- Below ---*/ .ui.pointing.below.label { margin-top: 0em; margin-bottom: 1em; } .ui.pointing.below.label:before { margin-left: -@pointingTriangleOffset; top: auto; right: auto; bottom: -@pointingTriangleOffset; left: 50%; } /*--- Left ---*/ .ui.pointing.left.label { margin-top: 0em; margin-left: 1em; } .ui.pointing.left.label:before { margin-top: -@pointingTriangleOffset; bottom: auto; right: auto; top: 50%; left: 0em; } /*--- Right ---*/ .ui.pointing.right.label { margin-top: 0em; margin-right: 1em; } .ui.pointing.right.label:before { margin-top: -@pointingTriangleOffset; right: -@pointingTriangleOffset; top: 50%; bottom: auto; left: auto; } /*------------------ Floating Label -------------------*/ .ui.floating.label { position: absolute; z-index: 100; top: @floatingTopOffset; left: 100%; margin: 0em 0em 0em @floatingLeftOffset !important; } /*------------------- Sizes --------------------*/ .ui.mini.labels .label, .ui.mini.label { font-size: @mini; } .ui.tiny.labels .label, .ui.tiny.label { font-size: @tiny; } .ui.small.labels .label, .ui.small.label { font-size: @small; } .ui.labels .label, .ui.label { font-size: @medium; } .ui.large.labels .label, .ui.large.label { font-size: @large; } .ui.huge.labels .label, .ui.huge.label { font-size: @huge; } .loadUIOverrides();