Skip to content

Commit fa584be

Browse files
committed
- pause animation when it's not running
1 parent 9b12214 commit fa584be

File tree

8 files changed

+132
-212
lines changed

8 files changed

+132
-212
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## v3.0.3 (upcoming)
4+
5+
- pause animation when it's not running
6+
7+
38
## v3.0.2
49

510
- upgrade modules to fix vulnerabilities

dist/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
display: block;
2222
background: none;
2323
animation: ldld-default 0.5s ease-in-out infinite;
24+
animation-play-state: paused;
2425
border-radius: 50%;
2526
width: 100%;
2627
height: 100%;
@@ -29,6 +30,12 @@
2930
border: 2px solid #fff;
3031
border-color: currentColor transparent currentColor transparent;
3132
}
33+
.ldld.default.running:before,
34+
.ldld.full.running:before,
35+
.ldld.ldbtn.running:before,
36+
.ldld.bare.running:before {
37+
animation-play-state: running;
38+
}
3239
/* default loader. auto centered */
3340
.ldld.default {
3441
position: absolute;

dist/index.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ldld.styl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
display: block
2020
background: none
2121
animation: ldld-default 0.5s ease-in-out infinite
22+
animation-play-state: paused
2223
border-radius: 50%
2324
width: 100%
2425
height: 100%
2526
margin: 0
2627
box-sizing: border-box
2728
border: 2px solid #fff
2829
border-color: currentColor transparent currentColor transparent
29-
30+
.ldld.default, .ldld.full, .ldld.ldbtn, .ldld.bare
31+
&.running:before
32+
animation-play-state: running
3033

3134
@keyframes ldld-default
3235
0%

0 commit comments

Comments
 (0)