Browse Source

Finishes math on ribbon triangle offset

pull/1698/merge
jlukic 9 years ago
parent
commit
4a6d444f08
2 changed files with 5 additions and 4 deletions
  1. 2
      src/definitions/elements/label.less
  2. 7
      src/themes/default/elements/label.variables

2
src/definitions/elements/label.less

@ -345,7 +345,7 @@ a.ui.label {
.ui[class*="right ribbon"].label { .ui[class*="right ribbon"].label {
text-align: left; text-align: left;
transform: translateX(-100%); transform: translateX(-100%);
left: ~"calc(100% + "@ribbonDistance~")";
left: @rightRibbonOffset;
border-radius: @borderRadius 0em 0em @borderRadius; border-radius: @borderRadius 0em 0em @borderRadius;
padding-left: @horizontalPadding; padding-left: @horizontalPadding;
padding-right: @ribbonDistance; padding-right: @ribbonDistance;

7
src/themes/default/elements/label.variables

@ -91,9 +91,10 @@
/* Ribbon */ /* Ribbon */
@ribbonTriangleSize: 1.2em; @ribbonTriangleSize: 1.2em;
@ribbonOffset: ~"calc(-1rem - "@ribbonTriangleSize~")";
@ribbonDistance: ~"calc(1rem + "@ribbonTriangleSize~")";
@ribbonMargin: 1em;
@ribbonMargin: 1rem;
@ribbonOffset: ~"calc("-@ribbonMargin~" - "@ribbonTriangleSize~")";
@ribbonDistance: ~"calc("@ribbonMargin~" + "@ribbonTriangleSize~")";
@rightRibbonOffset: ~"calc(100% + "@ribbonMargin~" + "@ribbonTriangleSize~")";
@ribbonShadowColor: rgba(0, 0, 0, 0.15); @ribbonShadowColor: rgba(0, 0, 0, 0.15);
@blackRibbonShadow: darken(@black, 10); @blackRibbonShadow: darken(@black, 10);

Loading…
Cancel
Save