Skip to content

Commit

Permalink
fix(button): correct vertical align for icons within buttons
Browse files Browse the repository at this point in the history
Since we centralized the vertical-align setting for icons , now icons within buttons also get the wrong vertical align. This PR sets a valid value for them
  • Loading branch information
lubber-de authored May 26, 2020
1 parent feed67a commit defb29e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/definitions/elements/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -615,15 +615,17 @@
.ui.button > .icon:not(.button) {
height: @iconHeight;
opacity: @iconOpacity;
margin: @iconMargin;
transition: @iconTransition;
vertical-align: @iconVerticalAlign;
color: @iconColor;
}

.ui.button:not(.icon) > .icon:not(.button):not(.dropdown),
.ui.button:not(.icon) > .icons:not(.button):not(.dropdown) {
margin: @iconMargin;
vertical-align: @iconVerticalAlign;
}
.ui.button:not(.icon) > .icons:not(.button):not(.dropdown) > .icon {
vertical-align: @iconVerticalAlign;
}
.ui.button:not(.icon) > .right.icon:not(.button):not(.dropdown) {
margin: @rightIconMargin;
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/elements/button.variables
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@iconDistance: @relative6px;
@iconColor: '';
@iconTransition: opacity @defaultDuration @defaultEasing;
@iconVerticalAlign: '';
@iconVerticalAlign: baseline;

@iconMargin: 0 @iconDistance 0 -(@iconDistance / 2);
@rightIconMargin: 0 -(@iconDistance / 2) 0 @iconDistance;
Expand Down

0 comments on commit defb29e

Please sign in to comment.