Skip to content

Commit

Permalink
fix: fixing size of button's icon (#811)
Browse files Browse the repository at this point in the history
* fixing size of button's icon

* fixed spacing between icon and text for new size
  • Loading branch information
rengare committed Mar 31, 2020
1 parent 6f65ebb commit ff17b9f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions src/button.scss
Expand Up @@ -51,6 +51,8 @@ $block: #{$fd-namespace}-button;
@mixin iconSize($size) {
&::before,
&::after {
width: $size;
height: $size;
font-size: $size;
line-height: $size;
}
Expand Down Expand Up @@ -124,8 +126,8 @@ $block: #{$fd-namespace}-button;
}

@mixin menuCompact() {
$fd-button-menu-button-padding: 1.469rem;
$fd-menu-button-icon-position-horizontal: 0.125rem / 2;
$fd-button-menu-button-padding: 1.812rem;
$fd-menu-button-icon-position-horizontal: 0.438rem;

padding-right: $fd-button-menu-button-padding;

Expand All @@ -146,8 +148,8 @@ $block: #{$fd-namespace}-button;
}

@mixin menu() {
$fd-button-menu-button-padding: 1.594rem;
$fd-menu-button-icon-position-horizontal: 0.1875rem;
$fd-button-menu-button-padding: 1.937rem;
$fd-menu-button-icon-position-horizontal: 0.562rem;

max-width: $fd-menu-button-max-width;
position: relative;
Expand All @@ -164,20 +166,8 @@ $block: #{$fd-namespace}-button;
position: absolute;
top: $fd-menu-button-icon-position-top;
right: $fd-menu-button-icon-position-horizontal;
margin-right: $fd-button-icon-margin;
margin-left: $fd-button-icon-margin;
}

&:empty {
&::before {
margin-right: 0;
margin-left: 0;
}

&::after {
margin-right: $fd-button-icon-margin;
margin-left: $fd-button-icon-margin;
}
margin-right: 0;
margin-left: 0;
}

@include fd-rtl() {
Expand All @@ -187,8 +177,6 @@ $block: #{$fd-namespace}-button;
&::after {
left: $fd-menu-button-icon-position-horizontal;
right: auto;
margin-right: $fd-button-icon-margin;
margin-left: $fd-button-icon-margin;
}

&:empty {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ff17b9f

Please sign in to comment.