Commit a5221b8
committed
perf: use composite animation
Skeleton is animated using css tranform instead of background
repositioning. Previously, changing background position caused the
renderer to repaint the gradient on each animation keyframe.
This implementation uses translateX to animate the skeleton effect.
Using css transform doesn't trigger repaint.1 parent af829d1 commit a5221b8
1 file changed
+20
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 2 | | |
6 | | - | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
16 | 31 | | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
20 | 35 | | |
21 | 36 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 37 | + | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
| |||
0 commit comments