Closed avelinet closed 9 years ago
Would be great, for added customization, to be able to set how many dots there are.
That way you could use a for loop to generate all the classes, delays and build the animation keyframes.
$loading__numberOfDots: 4 !default;
Note that using the animation-delay
does not work as expected (buggy) on older Android devices. On one project, we had to ditch it and resort to building new sets of animation keyframes to simulate the effect. You may want to look into that too.
I think we can do the number of dots as a different variation. This is a great start. Two little things and this is good to merge:
class="c-fixture-body"
otherwise it’s 100% of the viewport.+1
Oh, I just realized you're using animation delay to achieve your pulsating effect... (oh I forgot I mentioned this earlier above...) this is actually broken on older Android devices. For example, the animation delays actually fire completely at random, and desync across each other.
So instead of having a nice smooth pulsing animation from left to right, you get dots growing and shrinking at the correct rate, but starting at different times from each other.
At the very least, Android 4.1.2 and under.
The solution is very unsatisfying, unfortunately... you have to not use animation delay, and instead create unique keyframes that are basically the same animation, but with the timings shifted to simulate the delay effect...
We've had a few projects that have had to do this already.
So, this still needs work?
if we want to support 4.1.2 and under, yes. If not, then no.
Thoughts on what platforms we support on Stencil? @ry5n @avelinet @kpeatt
Gotta be what we support for Adaptive sites. Usually that’s Android 4.0+, iOS 6+ unless I’m mistaken.
@jeffkamo did you have a project with an example of the keyframes approach?
@avelinet, will send you a PM
Hey @jeffkamo and @ry5n , @avelinet and I removed the delay and have the dots running on separate animations.
Tested on Android 4.1.1 and it's running well.
+1 🌟
@yourpalsonja @avelinet That’s awesome, well done! Can we add a comment explaining why the animation is implemented the way it is (because Android)? Then we’re good to merge!
@ry5n done!
Hey all, at the suggestion of @avelinet , I also removed the attribution to https://github.com/tobiasahlin/SpinKit, since our new animation doesn't build on that at all.
Yay!
Another variation of a CSS loader. This one is four horizontal dots that animate. Made with multiple elements.
Status: Ready for review
Reviewers: @nastiatikk @cole-sanderson @mlworks @jeffkamo @ry5n @kpeatt
Minor work todo
class="c-fixture-body"
to the body element in the index.html test file