Skip to content

Commit 49b9cbf

Browse files
committed
#7023 Fix loading icon in button
1 parent 9e12d42 commit 49b9cbf

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

src/definitions/elements/button.less

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,23 @@
879879
transform: translateY(-50%);
880880
}
881881

882+
/* Loading */
883+
.ui.labeled.icon.button > .icon.loading {
884+
animation: none;
885+
}
886+
.ui.labeled.icon.button > .icon.loading:before {
887+
animation: labeled-button-icon-loading @loadingIconDuration linear infinite;
888+
}
889+
890+
@keyframes labeled-button-icon-loading {
891+
from {
892+
transform: translateY(-50%) rotate(0deg);
893+
}
894+
to {
895+
transform: translateY(-50%) rotate(360deg);
896+
}
897+
}
898+
882899
.ui.labeled.icon.buttons .button > .icon {
883900
border-radius: 0em;
884901
}

src/definitions/elements/icon.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ i.icon.loading {
7373
line-height: 1;
7474
}
7575

76-
i.icon.loading:before {
76+
i.icon.loading {
7777
animation: icon-loading @loadingDuration linear infinite;
7878
}
7979

8080
@keyframes icon-loading {
8181
from {
82-
transform: translateY(-50%) rotate(0deg);
82+
transform: rotate(0deg);
8383
}
8484
to {
85-
transform: translateY(-50%) rotate(360deg);
85+
transform: rotate(360deg);
8686
}
8787
}
8888

src/themes/default/elements/button.variables

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162

163163
/* Icon */
164164
@iconButtonOpacity: 0.9;
165+
@loadingIconDuration: 2s;
165166

166167
/* Labeled */
167168
@labeledLabelFontSize: @medium;

0 commit comments

Comments
 (0)