Skip to content

Commit

Permalink
fix(label): left/right pointing interferes with icon
Browse files Browse the repository at this point in the history
left/right pointing labels interfered with pure icon labels.
I changed this so people have have to explicisely set left icon in addition to right pointing. Therefore i tag this as a breaking change.
This change now also allows to have a left icon while also having a right close/delete icon
  • Loading branch information
lubber-de committed Apr 30, 2022
1 parent c08d4aa commit da049ae
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/definitions/elements/label.less
Expand Up @@ -73,7 +73,7 @@ a.ui.label {
}

/* Icon */
.ui.left.icon.label > .icon,
.ui.ui[class*="left icon"].label > .icon,
.ui.label > .icon {
width: auto;
margin: 0 @iconDistance 0 0;
Expand Down Expand Up @@ -105,9 +105,12 @@ a.ui.label {
}

/* Backward compatible positioning */
.ui.label.left.icon > .close.icon,
.ui.label.left.icon > .delete.icon {
.ui.label[class*="left icon"] > .close.icon,
.ui.label[class*="left icon"] > .delete.icon {
margin: 0 @deleteMargin 0 0;
&.right {
margin: 0 0 0 @deleteMargin;
}
}
.ui.label:not(.icon) > .close.icon,
.ui.label:not(.icon) > .delete.icon {
Expand All @@ -120,7 +123,7 @@ a.ui.label {
}

/* Right Side Icon */
.ui.right.icon.label > .icon {
.ui[class*="right icon"].label > .icon {
margin: 0 0 0 @iconDistance;
}

Expand Down

0 comments on commit da049ae

Please sign in to comment.