Font-awesome: Rendering issue: icon-spin fa-spin shake/wobble (chrome firefox)

Created on 13 Jan 2013  ·  147Comments  ·  Source: FortAwesome/Font-Awesome

✋ please read https://github.com/FortAwesome/Font-Awesome/issues/671#issuecomment-338336059 👈

When using data-loading-text, for example:

data-loading-text=" Logging in..."

And then when the button is clicked and the "loading" property is set, the icon will wobble and shake as it spins.

Although, if you include the spinning icon on the button as normal, for example:

It spins fine.

I've only encountered this bug on Firefox (currently version 18), works perfectly on Chrome.

edit by tagliala
Firefox related issue: #3451

bug cantfix

Most helpful comment

Doing .fa-spin { -webkit-filter: blur(0); } like this tweet suggests fixed it for me.

All 147 comments

Freaking Firefox. Been as much of a pain in this project as IE. Are you using 3.0.1? There's new Mozilla specific spin classes to help this issue. If it's still happening, let me know and I'll re-open.

I can confirm I'm using 3.0.1, I even re-downloaded and double checked and the issue persists.

In my previous comment, it seems like my examples were stripped out, I'd be happy to send you the mako template where this issue happens?

I have a shake/wobble when using .icon-spin on Chromium (24.0.1312.56) and Chrome on Linux, Firefox (18.0.2) seems fine. Tested on 13d5dd373cbf3f2bddd8ac2ee8df3a1966a62d09

I'm getting a shake/wobble on firefox 18.0.2 but not in Chrome or IE in certain circumstances. I haven't been able to pinpoint the exact cause however. (using font-awesome v3.0.2)

I'm getting wobble on all browsers under Windows 7, but it's a thing of beauty under OSX.

@davegandy ping

I'm getting a wobble on Chrome Version 26.0.1410.65 (fairly recent version). Any work on this?

ping! I'm also having the issue. Don't see why the issue was closed, as it still persists.

can you please provide a fiddle explaining the issue?

Same problem here, any solutions?

Confirmed for latest version of Chrome (28.0.1500.71). The smaller the icon, more exaggerated is the movement. This issue affect the icon-spin class anywhere is invoked.

I tried 3d rotation without any success. Rotating the icon-circle itself is an issue.

Under Windows 7, I'm having the issue in Firefox 22.0, Chrome 28.0.1500.72. IE 8-10 the wobble is barely visible, but looking closely at the case where I've been observing the issue, I think there's still a slight wobble. I'll do my best to set up a fiddle for the issue, but there's enough context that it may take some time.

Not my jsfiddle, but here's one with the issue: http://jsfiddle.net/Rnt9N/2/
Looks great on Mac but jittery on Firefox under Windows 7.

it's not so bad for me (firefox 22 / w7 x64).

I have same issue using node-webkit v0.7.5.
Ended up using spin.js

reopening this one since it's also FontAwesome's fault

Doing .fa-spin { -webkit-filter: blur(0); } like this tweet suggests fixed it for me.

@paldepind thanks for sharing this solution

Can you please provide a fiddle showing the current spin and the proposed spin side by side?

You can fork this fiddle: http://jsfiddle.net/tagliala/HgYqA/

I'm not seeing differences in the wobble with Chrome on Windows 7. I'm just noticing the icon spinning "slower", like at the half fps rate

@tagliala you're welcome!

Here's a fiddle showing two spinners, one with and one without the fix: http://jsfiddle.net/paldepind/XLdQX/

I've tested with Chrome 30 and Firefox 24 on Linux. In Firefox everything is smooth but in Chrome the spinner without the fix is slightly wobbly. I'm not seeing any difference in rotation speed in any of the browsers though.

Chrome 32 on Windows 7 doesn't display the icon at all...

image

In GNU/Linux, with Chromium 30 the fix is working. Not the same for Firefox 26, because the filter property is not yet supported. https://developer.mozilla.org/en-US/docs/Web/CSS/filter

For Firefox 26 on Windows 8, both are still wobbly for me. In Chrome 31 on Windows 8, both look fine.
On Dec 12, 2013, at 2:20 PM, Felipe Peñailillo [email protected] wrote:

In GNU/Linux, with Chromium 30 the fix is working. Not the same for Firefox 26, because the filter property is not yet supported. https://developer.mozilla.org/en-US/docs/Web/CSS/filter


Reply to this email directly or view it on GitHub.

Unfortunately it doesn't show on windows and sucks on OSX :(

http://jsfiddle.net/tagliala/XLdQX/2/

The spinning icon is not antialiased and keeps wobbling

screen shot 2013-12-13 at 10 46 39

I hoped this was a viable workaround but it isn't

@tagliala That's unfortunate. I had only tried the fix on my machine with Linux with great results.

@paldepind oh I know I remember that on my ubuntu machine the spinning stuff really sucks

Can you please give a try to subpixel transformations: http://jsfiddle.net/tagliala/96ULe/3/

Hi! I updated to Chrome 31 today and now the wobbling has disappeared. So maybe this problem will go away all by itself.

@tagliala not sure what I'm supposed to see. It all looks like it should I think. But again this is in Chrome 31 where I'm not seeing the wobble problem anymore.

@tagliala The subpixel transformations fiddle still shows wobbliness on Chrome 31 and Firefox 26 in Kubuntu.

However, I do agree that this is caused by subpixel rendering.

Here's a new fiddle that shows a rotation letter O ("oh") with a red, circular border around it.

http://jsfiddle.net/bBaVN/208/

This example really exacerbates the wobbly effect, because the red border rotates smoothly, but the O wobbles.

-webkit-filter: blur(0); does fix the issue for me. I can't find any other directives that fix it, including --webkit-font-smoothing.

I also tried disabling KDE's font anti-aliasing (System Settings -> Application Appearance -> Fonts -> Use anti-aliasing=Disabled), and _this also fixes the problem_.

unfortunately -webkit-filter: blur(0); is not a solution because it breaks windows

@tagliala not sure what version of Windows it's not working in for you. I've tested the solution proposed in latest Chrome and IE 11. It doesn't seem to work with Firefox.

@silentworks it breaks Win7 x64 - chrome 32

http://jsfiddle.net/tagliala/XLdQX/2/

Moreover, when it works, it's really poor antialiased.

I think the main problem is that icons inside fonts are not perfectly centered: http://jsfiddle.net/XLdQX/5/

As you can see in the screenshot below, there are 3 empty pixels below and 2 above: that will cause the wobble.

image

If you are able to set the width in a way that icon is centered, the icon won't wobble: http://jsfiddle.net/XLdQX/6/

IMHO this spinning feature should be removed, it causes more troubles than benefits

WONTFIX because a lot of work :-1:
but yeah, it was nifty... but not nescessary. Redoing all the fonts to get some icons to spin is a lot of work and goes against the tide.

@conrado there is no "wontfix" label here

it's still a wontfix. perhaps some of the gryphs that are appropriate for spin could be re-worked

it's still a wontfix.

No, it isn't. It's properly opened and labeled as bug

image

I'm not really sure the status of this issue, even after reading the comments, but since it's still marked as open: Chromium 31 and Firefox Aurora 28 (2014-1-13) on Xubuntu still have the shakes.

Ok, I think it's browser bug in every font.
There's three examples: http://jsfiddle.net/3T8Kz/

First: Font-Awesome font centerlized, with the bug.
Second: Another example but with a normal font
Third: Without fonts, just a div, with the same animation and without the bug.

The same bug for me Firefox 31, Linux.
If this is cause by glyphs size - it is enough to fix only glyphs intended to spin, not all of them.

:+1: +1 this should be considered for the next major version, where presumably all glyphs will be revisited.

Seeing this issue even on the official website: http://i.gyazo.com/3ba2d0afad90c2e7fe6d2c0bb34e661d.mp4

(Latest version of Firefox)

Would love to see this fixed :+1:

pull requests and deep investigations on this matter are very welcome

this seems to be a chrome bug

@davegandy any update?

Same on Chrome 37.0.2062.124 on Mac OS X, Safari on iOS 7.0.4

+1

I was able to treat (I won't say solve) this problem for fa-refresh in a local project using
-webkit-transform-origin: 49% 48.5%;
-moz-transform-origin: 49% 48.5%;
-ms-transform-origin: 49% 48.5%;
-o-transform-origin: 49% 48.5%;
transform-origin: 49% 48.5%;

I am using "fa-circle-o-notch" as as loading symbol and use this values for transform the origin so it will not wobble

.fa-circle-o-notch.fa-spin {
-webkit-transform-origin: 50% 48.9%;
-moz-transform-origin: 50% 48.9%;
-ms-transform-origin: 50% 48.9%;
-o-transform-origin: 50% 48.9%;
transform-origin: 50% 48.9%;
}

@magnyld I just tried that, but continues to wobble after DOM changes.

You can't rely using origins transform. This could break if the icon is bigger or smaller. As I said before, this is not font awesome problem, because if you try to spin a perfect circle styled div, the result is the same. I bet this is webkit engine bug.

Nope, this is present in firefox too https://bugzilla.mozilla.org/show_bug.cgi?id=930079

Wobbling in Firefox 33, OSX.

Same problem here (wobbling spin) :(

pull requests with a deep analysis of this issue, a workaround and a proper explanation of advantages and drawbacks will be very welcomed.

The problem seems to come from the icon itself. If you take the Icomoon spinner version, it does'nt wobble at all. It works well on Chrome 39, Windows and IE11, Windows. I don't know for the other browsers.

http://jsfiddle.net/cxxzh0uf/

@skoub

The approach of icomoon of keeping icons all of the same size seems better for this purpose but it isn't enough.

http://jsfiddle.net/tagliala/cxxzh0uf/2/

image

If I inspect the :before pseudoelement, I notice that fontawesome is "weird"

image

image

I tried to set the same width and height but things are not getting better.

I think that this is related to the font itself and there is nothing we can do via CSS.

Dave should take a look at the font and inspect fonts generated by Icomoon to try to understand what is the best way to fix this issue.

We can't accept pull requests with edits to the .otf file, but we will appreciate some help on this matter. If someone here is able to take a look at the font and identify the problem is very welcome

Sorry for my English, it is also late here :)

@tagliala thanks for linking fa-clock-o issue here as well, it's the same issue as rest are mentioning.
I've noticed that fa-cog has the same problem, but it is not as noticeable in the same circumstances as fa-clock or some of the others mentioned above. i'll keep watching this thread and will report if I find any workarounds, but I'm pretty convinced it's the small imperfections in glyphs themselves that are surfacing only once rotating, otherwise they're too small to notice by naked eye

I have met the same issue, is there a confirmed solution for this?

@TsuiJie no, there isn't

I had a similar issue with the shaking/wobbling spin icons in IE10 and 11.

My problem was that in IE 10/11 the scrollbars were showing and hiding (pulsing) as long as the spinner was visible.

what i found was that by setting the height and width of the icon tag to a set size (same size as the icon itself), the pulsing stopped.

Hope it helps someone.
Cheers

Okay, I've figured out the issue is in Font Squirrel conversion to webfont formats. Looks like it's munging some of the metrics. My plan:

  • test with a fresh version from Font Squirrel
  • if that doesn't work, roll my own conversion solution

Okay, after a considerable amount of investigation, I put in a few fixes:

  • Updated fa-spinner to have a better visual effect when spinning.
  • Home-rolled a webfont conversion. Font Squirrel was definitely messing things up.
  • Adjusted some font metrics that apparently have no effect on mac, but are heavily used by windows.
  • Added animated examples to the visual test page (http://fontawesome.io/test/).

The Results

  • Retina Mac: Flawless in Chrome, Safari, and Firefox
  • Non-retina Mac: Much better in Chrome, Safari, and Firefox
  • Windows 7: IE11 looks flawless, Chrome 39 still has issues, but I don't think it's any worse than it was

One Caveat

  • At a few font sizes, there's a bit of a wobble in all browsers (Icomoon has the same issue). Basically, if you keep it to multiples and half multiples of the optimized resolution (e.g. 14px, 21px, 28px, 35px), the wobble goes away.

Since the results are much better than they were, I'm going to call this acceptable for 4.3, and keep the issue open for 5.0.

One more update. I figured out what selected option was not working well for the Font Squirrel conversion. So I put those files back in. Leaving open.

@davegandy, i don't see any improvement on my side with Firefox & Chrome on windows. I didnt tried IE11. You can clearly see the wobble if you use steps in the animation.

I understand that you cannot do much on the 4.x branch but is there any solid solution for the 5.x branch?

.fa-spin2 {
    animation: fa-spin 1s infinite steps(8);
    -webkit-animation: fa-spin 1s infinite steps(8);
    -moz-animation: fa-spin 1s infinite steps(8);
    -o-animation: fa-spin 1s infinite steps(8);
}

For anyone else that made it this far, and is looking for some troubleshooting:

Do not use fa-spin and fa-fw together. This can cause the "wobble" effect.

This turned out to be my problem (and my solution).

@skoub

IE11 is almost perfect, IMHO the best in windows.

The spinner icon is new and it should be better than before.

Take a look at the bottom of this heavy page with all browsers: http://fontawesome.io/test/

Chrome and firefox are really bad at small sizes :disappointed:

with IE11, with fa-pulse, there's a little glitch. It's like if the spinner is moving 1px up and go down on the next animation step.

It's working for me on IE 11 and Chrome 40.0.2214.115 m but it's wobbling in Firefox 35.0.1.

Still noticeable in Firefox 36 for Linux.

The video is recorded at 50 FPS.

Font-awesome issue #671 firefox linux

Adding a scaleZ(1.001) fixes the issue for Firefox 36 on Linux.

Not sure if my problem was the same as everyone's, it seemed to be more like issue #4017, but that got closed and redirected here, so I'll just post my solution here.

Seems if you simply add the following to the .fa-spin class.

.fa-spin {
    text-align:center;
}

Seemed to fix the wobbliness for me.

Neither avoiding fa-fixed @qJake nor text-align:center @JakeCooper fixes it for me:
filter

(Without fa-spin, there is no jitter).

@isaksky could you please provide a fiddle showing this issue? I have an idea

@tagliala Here you go:

http://codepen.io/isaksky/pen/JoBqoM

Chrome 40.0.2214.115, Windows 7. Can't reproduce that issue on the provided codepen.

Which browser is giving you that output?

I'm not on my work computer right now, but I believe it is the latest normal Chrome on Windows 8. I can't normally reproduce it here on this mac in Chrome, but if I zoom in to 110% or 125% for example, it shows up. (There is also a problem where my my buttons stack vertically, but that isn't the problem I mean (I think I can fix that by using ems).). Does the jitter happen for you if you mess with the zoom?

I just got it to happen at normal (100%) zoom on this mac too. Seems related to messing with zoom and/or switching browser tabs. Btw the issue also happens with $('#spin-pls').toggleClass("fa-spin"), (instead of toggling 'hide' on it when already spinning) which might make it a little more clear where the problem is.

I will check tomorrow with my mac

I have a workaround here for spinning the cog. Nice and smooth when you hover.

http://codepen.io/jesseangelo/pen/KwrqdM?editors=010

I made a keyframe animation that spins only 30 degrees (rotateFa below). Then I call that like this animation: rotateFa .1s infinite;

@keyframes rotateFa {
    from { transform: rotate(0deg); }
    to { transform: rotate(30deg); }
}

And the opposite to reverse it back

@keyframes unRotateFa {
  from { transform: rotate(30deg); }
  to { transform: rotate(0deg); }
}

Problem still exist.

It still exist in the case of hardware acceleration disabled mode. Firefox 36.0.4.

Please do not +1 or confirm that this issue still exist, because the issue is open and because we do not know how to fix.

Please take a look here: https://github.com/FortAwesome/Font-Awesome/issues/671#issuecomment-65381998

Perhaps it would be a good idea to put a heads up on the examples page? The issue is big enough for me to be very wary of animated icons, but as per https://github.com/FortAwesome/Font-Awesome/issues/671#issuecomment-71056820, you wouldn't notice on a retina mac - even if you tested on all the major browsers.

@Vusys I agree. You could send a PR against the master branch or tell me what to write and I will do it

@tagliala done with pull request #6686 which adds the following warning below the examples:

Some browsers on some platforms have issues with animated icons resulting in a jittery wobbling effect. See issue #671 for examples and possible workarounds.

@Vusys thanks!

I see a much worse wobble than just +/- 1 pixel. There is some weird interaction between the spin transformation and other CSS transformations, so that sometimes the center of rotation is outside the spinner icon.

I haven't nailed down which CSS rule is causing this issue yet on my site, but it looks like a case of erroneous transformation order. The order should be: translate center of icon to (0,0), then rotate by current angle, then translate (0,0) to screen position at which center icon is to be displayed (or the reverse). Somewhere in there CSS is throwing another translation into the mix.

_Update:_ I figured out what the problem was in my case, so I'll post the answer here in case anyone else can benefit from this: I had a CSS rule that was changing the width of the 'i' element that the spinner was stored in (the Bootstrap element used for FA icons). Doing so gives unpredictable results depending on the context of the icon (e.g. depending on whether or not the text was centered).

I haven't nailed down which CSS rule

I'm pretty confident that it is not a css rule and the issue is not related to FA itself

Take a look here: http://jsfiddle.net/tagliala/g0ngLhyr/

@tagliala, if it's not related to a css rule or FA, how do you explain that Icomoon don't have the wobble effect?

demo: http://jsfiddle.net/cxxzh0uf/

another exemple is the one made by google: http://www.getmdl.io/components/index.html#loading-section/spinner

@skoub your fiddle updated to 4.3.0: http://jsfiddle.net/tagliala/cxxzh0uf/9/

Take a look here: http://jsfiddle.net/tagliala/g0ngLhyr/

Note that this fiddle doesn't have webfonts at all and still shows the wobble

@skoub google's implementation is not based on webfonts and IMHO that is the proper way to deal with this feature.

I'd like to share my experience here.

Single icons:
I only have a problem with wobble with stacked icons. Single icons spin or pulse just fine

Stacked icons:
Apparently on my site the code below does not wobble in a title where the font is a bit larger, but does wobble when the font is smaller. The fa-pulse wobbles in both cases

disclaimer: I am very new to all these things but as my site produces both wobbly and good results I thought you all might want to know.

@isaksky That wobble/blur with spinner has to do with hardware acceleration

Items that are being shown/hidden with the .hide class can have the browser hinted with the that content will be hidden

#spin-pls {
  will-change: contents;
}

However, Gecko-based browser, like Firefox, are, at least to me, still having issues with jumping text in the dialog box.

.job-order-dialog {
  will-change: transform;
}

works, but negatively effects Chrome by overcompensating and blurring the text all of the time. I came up with two possible solutions, the first just targets Firefox, the latter is a different acceleration, filter: blur(0); noted in this bug but is a bit hacky in my opinion--similar to transform: translateZ(0);--and could lead to negative outcomes in the future.

@-moz-document url-prefix() {
  .job-order-dialog {
    will-change: transform;
  }
}
.job-order-dialog {
  filter: blur(0);
}

That fixes the issue, thanks @toastal ! Could this be worked into a general solution @tagliala ?

@toastal do you mind to provide a jsfiddle showing your solution and comparing with basic fontawesome spin?

I'm trying al examples you guys posted, and I can't reproduce in Firefox Aurora:

20150722004007
Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0

I'm on debian Jessie, and because of some nvidia driver issues, I think I don't have hardware acceleration.

GLXtest process failed (exited with status 1): GLX extension missing
Procesador WebGL Bloqueado para tu tarjeta gráfica debido a problemas no resueltos del controlador.

Also, can't reproduce here:
http://shb.github.io/bootstrap-loading-screen/#icon:spinner

is it solved, or it's because I don't have hardware acceleration enabled?

I have found another potential fix for this issue (running firefox 39) thanks to this post: http://www.useragentman.com/blog/2014/05/04/fixing-typography-inside-of-2-d-css-transforms/

I have edited the JSFiddle above with the fix: http://jsfiddle.net/5z9om45L/

just put "perspective(1px)" in the transform property. This "throws rendering of the object to the GPU", according to the post linked above. I have not personally tested this extensively so I do not know what specifically this does or if it causes any other issues, but so far it looks fine. This has been one of my biggest issues with Firefox, so I thought I'd mention it here.

I have edited the JSFiddle above with the fix: http://jsfiddle.net/5z9om45L/

It fixes the issue just fine for me.

Here is an updated Fiddle that shows the wobbling on the compass. The second locate button shows a simple fa-spin with pronounced wobbling.

http://jsfiddle.net/Lpur9ek1/1/

@spiderr apparently, fa-lg increases the wobble effect because it deals with line height and font size. Try to use a font size of 14px or multiples

@tagliala thanks, great tip! fa-2x definitely better. There are also some odd artifacts (dirty pixels) around the circle. Here is a fiddle at fa-5X that shows them more clearly on the large blue button. This is a minute detail, but if someone ever cleans up the compass, that would be great. My hope is that when the compass spins, you could not tell the the circle was moving, only the inner compass needle. If I sit 2 meters from the screen with fa-5x, it looks great :-)

http://jsfiddle.net/mhqLvw79/1/

Not sure if this is the right thread, but..
In firefox, my "fa fa-cog fa-spin" stops spinning. I use it in an ajax call with a modal. It works fine in Safari and Chrome but firefox stops for some reason. Any thoughts??

app/javascripts/my_file.js
$(document).ready(function() {
$('#search_btn').on('click', function() {
$('#results').empty();
var myForm = $('#user_search');
$("#spinner_modal").modal("show");
$.ajax({
url: myForm.attr('action'),
type: "POST",
data: myForm.serialize(),
dataType: 'text',
success: function(html){
$("#spinner_modal").modal("hide");
$('#results').append(html);
},
error: function(xhr, satus, err) {
$("#spinner_modal").modal("hide");
},
timeout: 60000
});
return false;
});

_my_partial.html.erb

@jonathanparrish please start a new issue. Do not worry to mention me, I will take a look :)

How I solved my issue with out-of-center rotation of icon font:
There were several issues I had to resolve:
1. size of icon: it has to be whole px size (e.g. font-size:small; makes my icon 17.5px so center is not absolute center for transformation)
2. defining display: block on icon level makes it center correctly in the middle of the parent div
3. defining exact square size of parent div (in my case button) and fixed padding made it center correctly
4. adding any text-shadow will change the size of the inner icon so it will be out of the center. Trick is to change the hover style to be the same shadow with color same as background in my case

So here is the code:

button.close {
    padding: 10px;
    opacity: 0.8;
    text-shadow: 1px 1px 1px #999; 
    width: 40px;
    height: 40px;
}
button.close i{
    font-size: 20px;
    max-width: 20px;
    max-height: 20px;
    display: block;
}
button.close:hover {
    text-shadow: 1px 1px 1px #fff; 
}
/* rotation CSS*/
@keyframes anim-rotate {
    0% {
        -moz-transform:rotate(0);
        -webkit-transform:rotate(0);
        transform:rotate(0);
    }
    100% {
        -moz-transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@keyframes anim-rotate-next {
    0% {
        -moz-transform:rotate(0);
        -webkit-transform:rotate(0);
        transform:rotate(0);
    }
    100% {
        -moz-transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
.rotate{
    animation: anim-rotate-next 1s normal linear;
}
.rotate.down{
    animation: anim-rotate 1s normal linear;
}

HTML:

<div id="NewsTitle" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
        <div>
            <button type="button" class="close visible-sm-block hidden-xs"><i class="fa fa-expand"></i></button>
            <button type="button" class="close"><i class="fa fa-chevron-up"></i></button>
            <button type="button" class="close"><i class="fa fa-refresh rotate"></i></button>
            <span>Vesti</span>
        </div>
    </div>

and finally JQuery for switching rotate class

$("#NewsTitle").on('click', 'i.fa-refresh', function () {
    // rotiraj ikonu
    $(this).toggleClass("down");
}); 

https://jsfiddle.net/4ya23yjL/8/

@goranbujic thanks for sharing this

Could you please make a fiddle showing your approach (you could use this one as a base http://jsfiddle.net/tagliala/4ya23yjL/) and properly format your post?

Thanks!

just did it... sorry first one on gitHub :)

Date: Thu, 1 Oct 2015 07:53:45 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [Font-Awesome] Rendering issue: icon-spin fa-spin shake/wobble (chrome firefox) (#671)

@goranbujic thanks for sharing this

Could you please make a fiddle showing your approach (you could use this one as a base http://jsfiddle.net/tagliala/4ya23yjL/) and properly format your post?

Thanks!


Reply to this email directly or view it on GitHub.

Love you all guys. Thanks for the transform-origin: 49% 48.5%; fix on .fa-refresh.fa-spin <3

But seriously, would love to get those things symetrically if they're going to be animated!

If anyone here for ionicons like me, this will does the trick transform-origin: 52% 50%;

confirming the issue on

Google Chrome:  51.0.2662.0 (Officiell version) canary (64 bitar)
Version:    4d223c72fe4e76c7404bffb662f742b947f97107-refs/heads/master@{#378134}
OS  Mac OS X 

aka latest chrome canary, this only applies for fa-pulse tough (tested mainly with fa fa-spinner fa-pulse)

Previously on v4.5.0 I had to add the following CSS style to fix the wobbling issue on spinner:

.fa.fa-spinner.fa-pulse {
  transform-origin: 50% 48.5%;
}

However on 4.6.1 that css actually made it worse. 4.6.1 seems to have solved the wobbling issue for spinner.

concerning this one:

http://jsfiddle.net/tagliala/g0ngLhyr/

the question is whether or not this thing is dead center, especially concerning that this thing uses whatever font is available on the system.
it might be intresting to ave an image or an SVG which has a perfect dead-centered circle and let that spin.

update:
http://jsfiddle.net/xntwxwra/
it doesnt seem to wobble here ([email protected]) just no anti-aliasing probably makes it look a bit funny.

This may or may not help. I had a wobble in Chrome 51.0.2704.103 m, and realized the css that came with my template had set letter-spacing: 0.25em;. For the fa-spin class, I reset it to letter-spacing: normal; and voila, no wobble!

I'm not sure if we're talking about the same thing but I noticed that <i class="fa fa-pulse fa-spinner fa-fw"</i> appears jumpy when used within small element. I'm not a css hero, so I just "solved" it by wrapping it within a span (and thus removing the small)

I'm using font awesome 4.6.3 from maxcdn.bootstrap.com with bootstrap 3.3.7 from netdna.bootstrapcnd.com.

i can reliably reproduce the wobbling when changing the font size of the parent element. In this fiddle in a chrome browser, the left spinner is wobbling while the right spinner is fixed.

The amount of "fixes" people are using worries me, if there are lots of different "fixes" people are posting just how many have actually been tested to work across all browsers.

If the glyph isn't symmetrically positioned such as that the gap between the top and the bottom differ there is going to be a "wobble" as described.

It has already been suggested that remaking the glyphs is a lot of work, so why not just use an image (such as an SVG) which would be better suited for a spinning icon? You don't need to use Font Awesome to solve all your problems and sometimes it doesn't make sense to do so.

Wobbling effect appeared after upgrade from Firefox 48 to Firefox 49 under Ubuntu Xenial 16.04.
Was fixed by addition of "line-height: normal" as suggested in this thread.

@Matthew-Bonner So, if it is not suitable for this purpose, it should be removed from the documentation!

@mehrandvd some of the icons work perfectly fine, hence why there is documentation to cover this, maybe it would be better to update the documentation to make it clear that some icons don't work as well as others and there are known issues.

@Matthew-Bonner this is a good idea and it is partially documented.

Some browsers on some platforms have issues with animated icons resulting in a jittery wobbling effect. See issue #671 for examples and possible workarounds.

if you have a suggestion to improve this sentence, feel free to submit a PR against the master branch

@tagliala I will do, and I think given Font Awesome 5 is being developed, this bug should be put to bed by closing it and adding the label "wontfix" as there isn't really anything that can be done.

I found out that the wobbling effect depends on the font-size.
e.g. i changed font size 1.5em to 1.4em and 21px to 20px and voila, no wobbling anymore.

I solved my issue by replacing the circle-o-notch icon by an svg version of it (with correction of the non-square aspect ratio).

Here's a fiddle for it: https://jsfiddle.net/vwqzv1mr/5/

I have the same problem (2017) with ALL browsers (IE, FF, Chrome, Safari). Didn't know its such a big problem to keep a spinner centered.

I'm beginning a campaign, giving away the top requests for FA icons for free, open source. You can incorporate them in a number of ways: generating another icon font, svg set, or (my preference) compiling all FA and third party icons into a single file.

Different spin icons are here.

Previous ones were moderator, discord, coins, Google Play, thin Close, walking man, t-shirt, Xbox, Nintendo Wii U, Nintendo, PlayStation, Facebook messenger and Line icons.

Please let me know if you want me keep going these icon requests, or compile some upgrade file, or how should we do it?

Not shore if this will help but I've managed to make the spinner static by fiddling a bit with the CSS. I tested both Glyphicons and FontAwesome fonts, just to see witch one looked better. I tried rotating the icon and rotating a container with and icon. There are 5 key parameters to make this work (font-size, height, width, line height and text indent).

You can find and example here:
https://jsfiddle.net/Dhanck/syb9qubj/2/

looking forward to version 5!!

@Dhanck7: Thanks for you sharing this! What a CSS orgy is required to make it work! In between I found a simple animation "outside" Font Awesome that works out of the box!

Still can't believe they got over 1 million for Font Awesome 5 from Kickstarter but are unable to make a simple animation working properly. sigh

well as you can already see these animations are quite complicated, this doesnt work so easily.

the problem is that we are dealing with characters, aka text, not images which makes this a lot more complicated.

And how about this way:
https://jsfiddle.net/Dhanck/9t6y85jx/2/

Just adjusting a 3 parameters and using the default animation behaviour from FontAwesome...

You could also use JavaScript to remove the line gap property I guess.

Alright, everyone.

With version 5 on the horizon I think we've fixed this with the new SVG framework. I just did a battery of tests using the new SVG "cog" and the spin is perfectly centered in the dozens of browsers that I tested.

If you've backed the Kickstarter or pre-ordered and have access to the latest alpha release (available for download from within your account) can you help me test this out?

I'd love to put this issue to bed with Font Awesome 5!

Great to hear! I haven't backed Font Awesome 5 but I'm willing to buy it after release. Do all icons in Font Awesome 5 have the same height and width? It sometimes screwed up my GUI just by different height/width.

@Taygair the icons have the same height but the width varies.

I know... On using the fa-rotate the height turns to width and visa versa. There are some icons that do have - visually - the same height and width (symmetric ones) but they don't. It would be nice if they would have the same height/width (in FA5).

I see that it's probably going to be fixed in the upcoming FA⁵ release, but just in case smb needs a quick fix for the .fa-circle-o-notch, here is little dirty css replacement

.loader {
  width: 1em;
  height: 1em;
  border: .1em solid black;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fa-spin 2s infinite linear;
}

So far this appears to be working well with the SVG framework. Closing unless someone finds this to be false.

working well with the SVG framework

If webfonts are still affected and FA5 free will be affected too, I should label this as wontfix and advise to consider a svg solution for spinning icons

@tagliala agreed. I'm afraid that web fonts will always be plagued with issues around this so SVG is the best solution if this is an issue. We'll have FA5 Free out just as soon as we can.

well SVG framework isnt bad but has one annoying thing: Javascript.

there are many reasons why ppl use things like noscript to protect themselves from stuff js might do and when stuff doesnt work with JS it's ugly imo.

I mean we have things like @font-face and CSS animations and whatnot so that JS is no longer needed for tasks like these and that's a good thing.

Sorry, 😢

labeled as wontfix, but it is actually a "can't fix"

TL;DR
Please make sure that you are using a font size multiple of 16px (14px for FA4) for your spinner. It helps.
If you are not satisfied and you need a pixel perfect spinner, please consider to use an animated SVG spinner.

@My1, you don't need JS to animate SVG, you can use CSS.

good call @tagliala ..."can't fix" is more accurate. I've _tried_ multiple times :D

well but the SVG framework will only load in a JS-enabled browser.

I tried already.

if you have FA Pro, get the demo server, disable js (easy to do in chrome) and access

http://localhost:3344/docs/svg-framework.html

you will see that no icon will load.

you can probably do the svgs alone, but my response was precisely towards the ones who said SVG Framework.

also who has this issue? I tried @tagliala 's link in Firefox chrome and opera and didnt notice much wobble (and I certainly should be able to notice anything weird in the pixels when I go like 5cm close to my 42 inch FHD Screen where you can easily see the pixels)

also foa FA5 would it become 16px then coz the base size changes?

how is this a huge problem

Using a negative text-indent value fixed the problem for me

Seems like filter: blur(0) does the job and it's very well supported https://caniuse.com/#feat=css-filters

A combination of @andreobriennz's solution and setting line-height for each size gets pretty good results for me. Still a very slight sub-pixel wobble but basically unnoticeable.

.fa-spin {
  text-indent: -0.000001em;
  line-height: 0.6em;
}
.fa-spin.fa-lg {
  line-height: 0.7em;
}
.fa-spin.fa-2x {
  line-height: 0.8em;
}
.fa-spin.fa-3x,
.fa-spin.fa-4x,
.fa-spin.fa-5x {
  line-height: 1em;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rufengch picture rufengch  ·  3Comments

daneren2005 picture daneren2005  ·  3Comments

faithdong picture faithdong  ·  3Comments

ghost picture ghost  ·  3Comments

lickmydesign picture lickmydesign  ·  3Comments