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

Pale text rendering in iOS #58

Open
genericmilk opened this issue Apr 29, 2019 · 8 comments
Open

Pale text rendering in iOS #58

genericmilk opened this issue Apr 29, 2019 · 8 comments
Labels

Comments

@genericmilk
Copy link

genericmilk commented Apr 29, 2019

Hi there!

HUGE fan of this script and use it in a lot of my projects, It's fab!

I have a slight issue with rendering on iOS, The colour of the font appears pale, As if it were semi transparent. I'm using this to init bounty;

bounty.default({ el: '.RevivedRev h1', value: '$' + $('.RevivedRev h1').attr('data-rev'), initialValue: '$0.00', lineHeight: 1, animationDelay: 1000, letterSpacing: 0.1, });

Is this a potential issue with a recent rendering change of svg in iOS? Can offer screenshots of issue if needed.

Cheers!

@genericmilk
Copy link
Author

On closer inspection it seems to be an issue with the style filter: url("#motionFilter-x-xxxxxxxxx"); - Safari in general (macOS too) doesn't seem to dump this filter on callback and leaves it enabled resulting in semi transparent text

@coderitual
Copy link
Owner

Hi, thanks for the feedback. Yea there is a lot of issues related to filters across different browsers. Could attach some screenshots with the issue?

@genericmilk
Copy link
Author

Of course! The first screenshot has the issue after the animation, This is Safari 12.1.1 (14607.2.6.1.1) and appears to share the same issue with iOS

Screenshot 2019-05-24 at 14 24 21

After removing the motionfilter from the element for the figure it seems to correct itself (See number 5)
Screenshot 2019-05-24 at 14 24 35

Thanks so much again :D

@coderitual
Copy link
Owner

Uh oh, you are right. I think I saw this before. The solution might be to remove filters after animation finishes. Are you ok to work on a PR fixing this?

@genericmilk
Copy link
Author

Sure, I'll see what I can do 👍 Cheers!

@tylerdcorwin
Copy link

tylerdcorwin commented Jun 10, 2019

Hey there,

Great script, thanks for sharing!!
I'm having the same issue with the Pale colors, but not entirely sure what you mean by

removing the motionfilter from the element for the figure

Could you please elaborate on how I can fix this, or where to look?

Thanks!

@coderitual
Copy link
Owner

Hi @tylerdcorwin
During animation there are filters applied to all elements which are being moved around (motion blur). This is done by setting specific filter id on particular element

::style('filter', `url(#motionFilter-${id})`);

Value of the motion filter is set to 0 after digit reaches destination (we don’t need motion blur when there is no motion). The filter is still applied though which causes issue. We can remove it from digit entirely (by resetting filter attr) after animation ends.

@tylerdcorwin
Copy link

Ah Gotcha
I'll try resetting the filter attribute after the animation completes,
Thanks for the quick reply @coderitual, and thanks again for the great script!

@coderitual coderitual added the bug label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants