Skip to content

Commit 2db948b

Browse files
committed
- limit transition to only the style we need to animate.
1 parent 1bcd50d commit 2db948b

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

CHANGELOG.md

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

3+
## v2.0.1
4+
5+
- limit transition to only the style we need to animate.
6+
7+
38
## v2.0.0
49

510
- rename `ldbtn.css`, `ldbtn.min.css` to `index.css` and `index.min.css`

dist/index.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
.ld-over-full,
88
.ld-over-full-inverse {
99
position: relative;
10-
transition: all 0.3s;
11-
transition-timing-function: ease-in;
1210
}
1311
.ld-ext-right > .ld,
1412
.ld-ext-left > .ld,
@@ -56,7 +54,14 @@
5654
z-index: auto;
5755
visibility: visible;
5856
}
57+
.ld-ext-right,
58+
.ld-ext-left,
59+
.ld-ext-bottom,
60+
.ld-ext-top {
61+
transition-timing-function: ease-in;
62+
}
5963
.ld-ext-right.running {
64+
transition: padding-right 0.3s;
6065
padding-right: 2.5em !important;
6166
}
6267
.ld-ext-right > .ld {
@@ -65,6 +70,7 @@
6570
right: 1.25em;
6671
}
6772
.ld-ext-left.running {
73+
transition: padding-left 0.3s;
6874
padding-left: 2.5em !important;
6975
}
7076
.ld-ext-left > .ld {
@@ -73,6 +79,7 @@
7379
left: 1.25em;
7480
}
7581
.ld-ext-bottom.running {
82+
transition: padding-bottom 0.3s;
7683
padding-bottom: 2.5em !important;
7784
}
7885
.ld-ext-bottom > .ld {
@@ -81,6 +88,7 @@
8188
bottom: 1.25em;
8289
}
8390
.ld-ext-top.running {
91+
transition: padding-top 0.3s;
8492
padding-top: 2.5em !important;
8593
}
8694
.ld-ext-top > .ld {

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.

src/index.styl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.ld-ext-right, .ld-ext-left, .ld-ext-bottom, .ld-ext-top, .ld-over, .ld-over-inverse, .ld-over-full, .ld-over-full-inverse
22
position: relative
3-
transition: all .3s
4-
transition-timing-function: ease-in
53
& > .ld
64
position: absolute
75
top: 50%
@@ -25,28 +23,35 @@
2523
z-index: auto
2624
visibility: visible
2725

26+
.ld-ext-right, .ld-ext-left, .ld-ext-bottom, .ld-ext-top
27+
transition-timing-function: ease-in
28+
2829
.ld-ext-right.running
30+
transition: padding-right .3s
2931
padding-right: 2.5em!important
3032
.ld-ext-right > .ld
3133
top: 50%
3234
left: auto
3335
right: 1.25em
3436

3537
.ld-ext-left.running
38+
transition: padding-left .3s
3639
padding-left: 2.5em!important
3740
.ld-ext-left > .ld
3841
top: 50%
3942
right: auto
4043
left: 1.25em
4144

4245
.ld-ext-bottom.running
46+
transition: padding-bottom .3s
4347
padding-bottom: 2.5em!important
4448
.ld-ext-bottom > .ld
4549
top: auto
4650
left: 50%
4751
bottom: 1.25em
4852

4953
.ld-ext-top.running
54+
transition: padding-top .3s
5055
padding-top: 2.5em!important
5156
.ld-ext-top > .ld
5257
bottom: auto

0 commit comments

Comments
 (0)