diff --git a/src/definitions/elements/label.less b/src/definitions/elements/label.less index 44fc2ec11..6039a6b48 100755 --- a/src/definitions/elements/label.less +++ b/src/definitions/elements/label.less @@ -362,6 +362,7 @@ a.ui.label { /* Positioning */ .ui.ribbon.label { left: @ribbonOffset; + margin-right: -@ribbonTriangleSize; padding-left: @ribbonDistance; } .ui[class*="right ribbon"].label { @@ -370,23 +371,23 @@ a.ui.label { } -/* Inside Segment */ -.ui.segment > .ui.ribbon.label { - left: @ribbonSegmentOffset; - padding-left: @ribbonSegmentDistance; -} -.ui.segment > .ui[class*="right ribbon"].label { - left: @rightRibbonSegmentOffset; - padding-left: @horizontalPadding; - padding-right: @ribbonSegmentDistance; -} - /* Inside Image */ .ui.image > .ribbon.label, .ui.card .image > .ribbon.label { position: absolute; top: @ribbonImageTopDistance; } +.ui.card .image > .ui.ribbon.label, +.ui.image > .ui.ribbon.label { + left: @ribbonImageOffset; + padding-left: @ribbonImageDistance; +} +.ui.card .image > .ui[class*="right ribbon"].label, +.ui.image > .ui[class*="right ribbon"].label { + left: @rightRibbonImageOffset; + padding-left: @horizontalPadding; + padding-right: @ribbonImageDistance; +} /*------------------- diff --git a/src/themes/default/elements/label.variables b/src/themes/default/elements/label.variables index 70ae4edc1..9ae8c833c 100644 --- a/src/themes/default/elements/label.variables +++ b/src/themes/default/elements/label.variables @@ -94,15 +94,15 @@ @ribbonTriangleSize: 1.2em; @ribbonShadowColor: rgba(0, 0, 0, 0.15); -@ribbonMargin: -0.05rem; /* Rounding Offset on Triangle */ +@ribbonMargin: 1rem; @ribbonOffset: ~"calc("-@ribbonMargin~" - "@ribbonTriangleSize~")"; @ribbonDistance: ~"calc("@ribbonMargin~" + "@ribbonTriangleSize~")"; @rightRibbonOffset: ~"calc(100% + "@ribbonMargin~" + "@ribbonTriangleSize~")"; -@ribbonSegmentMargin: 1rem; -@ribbonSegmentOffset: ~"calc("-@ribbonSegmentMargin~" - "@ribbonTriangleSize~")"; -@ribbonSegmentDistance: ~"calc("@ribbonSegmentMargin~" + "@ribbonTriangleSize~")"; -@rightRibbonSegmentOffset: ~"calc(100% + "@ribbonSegmentMargin~" + "@ribbonTriangleSize~")"; +@ribbonImageMargin: -0.05rem; /* Rounding Offset on Triangle */ +@ribbonImageOffset: ~"calc("-@ribbonImageMargin~" - "@ribbonTriangleSize~")"; +@ribbonImageDistance: ~"calc("@ribbonImageMargin~" + "@ribbonTriangleSize~")"; +@rightRibbonImageOffset: ~"calc(100% + "@ribbonImageMargin~" + "@ribbonTriangleSize~")"; @blackRibbonShadow: darken(@black, 10); @blueRibbonShadow: darken(@blue, 10);