File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // By courtesy of https://csslab.app/animations/wobble
2+ @keyframes wobble- effect {
3+ 0% , 100% {
4+ transform : translateX (0% );
5+ transform-origin : 50% 50% ;
6+ }
7+
8+ 15% {
9+ transform : translateX (calc (-1 * var (--wobble-distance ))) rotate (calc (-1 * var (--wobble-rotation )));
10+ }
11+
12+ 30% {
13+ transform : translateX (calc (var (--wobble-distance ) / 2 )) rotate (var (--wobble-rotation ));
14+ }
15+
16+ 45% {
17+ transform : translateX (calc (var (--wobble-distance ) / -2 )) rotate (calc (var (--wobble-rotation ) / -1.8 ));
18+ }
19+
20+ 60% {
21+ transform : translateX (calc (var (--wobble-distance ) / 3.3 )) rotate (calc (var (--wobble-rotation ) / 3 ));
22+ }
23+
24+ 75% {
25+ transform : translateX (calc (var (--wobble-distance ) / -5.5 )) rotate (calc (var (--wobble-rotation ) / -5 ));
26+ }
27+ }
Original file line number Diff line number Diff line change 4444 -webkit-user-select : @user-select ;
4545 user-select : @user-select ;
4646}
47+
48+ .wobble-effect (@duration : 1s ; @timing : ease ; @iteration : infinite ; @distance : 32px ; @rotation : 15deg ) {
49+ --wobble-distance : @distance ;
50+ --wobble-rotation : @rotation ;
51+ animation : wobble- effect @duration @timing @iteration ;
52+ }
You can’t perform that action at this time.
0 commit comments