Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(comp:button): fix icon not vertically centered #1542

Merged
merged 1 commit into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
.reset-color(@button-color, @button-background-color);

position: relative;
display: inline-block;
text-align: center;
display: inline-flex;
align-items: center;
justify-content: center;
white-space: nowrap;
cursor: pointer;
user-select: none;
Expand All @@ -24,7 +25,7 @@
top: -1px;
right: -1px;
bottom: -1px;
left: -1px;

Check warning on line 28 in packages/components/button/style/index.less

View check run for this annotation

codefactor.io / CodeFactor

packages/components/button/style/index.less#L28

Expected shorthand property "inset" (declaration-block-no-redundant-longhand-properties)
z-index: 1;
background: @button-background-color;
border-radius: inherit;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

height: @height;
min-width: @min-width;
padding: calc((@height - @font-size - var(--ix-line-height-gutter) - 2px) / 2) @padding-horizontal;
padding: 0 @padding-horizontal;

&.@{button-prefix}-circle,
&.@{button-prefix}-square {
Expand Down
1 change: 1 addition & 0 deletions packages/components/drawer/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
}

&-footer {
display: flex;
padding: 12px 16px;

.@{button-prefix} + .@{button-prefix} {
Expand Down
3 changes: 2 additions & 1 deletion packages/components/modal/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
}

&-footer {
text-align: end;
display: flex;
justify-content: flex-end;
padding: 12px 16px;

.@{button-prefix} + .@{button-prefix} {
Expand Down