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

[Button, Icon] Loading icon Position in Button was not rotating around center #361

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/definitions/elements/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,8 @@
border-top-left-radius: inherit;
border-bottom-left-radius: inherit;
text-align: center;
animation:none;
padding: @verticalPadding 0 @verticalPadding 0;

margin: @labeledIconMargin;
width: @labeledIconWidth;
Expand Down Expand Up @@ -1011,11 +1013,10 @@
.ui.labeled.icon.buttons > .button > .icon:after,
.ui.labeled.icon.button > .icon:after {
display: block;
position: absolute;
position: relative;
width: 100%;
top: 50%;
top: 0;
text-align: center;
transform: translateY(-50%);
}

.ui.labeled.icon.buttons .button > .icon {
Expand Down Expand Up @@ -1045,7 +1046,10 @@
padding-right: @horizontalPadding !important;
}


/* Loading Icon in Labeled Button */
.ui.labeled.icon.button > .loading.icon:before {
animation: loader 2s linear infinite;
}


/*--------------
Expand Down
10 changes: 1 addition & 9 deletions src/definitions/elements/icon.less
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,7 @@ i.icon:before {
i.icon.loading {
height: 1em;
line-height: 1;
animation: icon-loading @loadingDuration linear infinite;
}
@keyframes icon-loading {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
animation: loader @loadingDuration linear infinite;
}

/*******************************
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 @@ -44,7 +44,7 @@
;

/* Icon */
@iconHeight: @relativeTiny;
@iconHeight: auto;
@iconOpacity: 0.8;
@iconDistance: @relative6px;
@iconColor: '';
Expand Down