From 1f7160203ee8a4c7c42dad2815113967571e97b9 Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Sat, 5 Jan 2019 17:46:24 +0100 Subject: [PATCH] fix(button, icon): loading icon position in button was not rotating around center --- src/definitions/elements/button.less | 12 ++++++++---- src/definitions/elements/icon.less | 10 +--------- src/themes/default/elements/button.variables | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/definitions/elements/button.less b/src/definitions/elements/button.less index ace7bcde44..e29951dcd1 100755 --- a/src/definitions/elements/button.less +++ b/src/definitions/elements/button.less @@ -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; @@ -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 { @@ -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; +} /*-------------- diff --git a/src/definitions/elements/icon.less b/src/definitions/elements/icon.less index 3d80760515..d2b6c89888 100755 --- a/src/definitions/elements/icon.less +++ b/src/definitions/elements/icon.less @@ -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; } /******************************* diff --git a/src/themes/default/elements/button.variables b/src/themes/default/elements/button.variables index 9e4d4e5ec2..76694bf96c 100644 --- a/src/themes/default/elements/button.variables +++ b/src/themes/default/elements/button.variables @@ -44,7 +44,7 @@ ; /* Icon */ -@iconHeight: @relativeTiny; +@iconHeight: auto; @iconOpacity: 0.8; @iconDistance: @relative6px; @iconColor: '';