Repository navigation
Expand file tree
/
Copy pathpull-to-refresh.less
More file actions
75 lines (72 loc) · 1.81 KB
/
Copy pathpull-to-refresh.less
File metadata and controls
75 lines (72 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* === Pull To Refresh === */
@layerHeight: 2.2rem;
.pull-to-refresh-layer {
position: relative;
// margin-top: -44px;
left:0;
top:0;
width:100%;
height:@layerHeight;
.preloader {
position: absolute;
left: 50%;
top: 50%;
margin-left: -0.5rem;
margin-top: -0.5rem;
visibility: hidden;
}
.pull-to-refresh-arrow {
width: 0.65rem;
height: 1rem;
position: absolute;
left: 50%;
top: 50%;
margin-left: -0.15rem;
margin-top: -0.5rem;
background: no-repeat center;
.encoded-svg-background("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 40'><polygon points='9,22 9,0 17,0 17,22 26,22 13.5,40 0,22' fill='#8c8c8c'/></svg>");
background-size: 0.65rem 1rem;
z-index: 10;
transform: rotate(0deg) translate3d(0,0,0);
transition-duration: 300ms;
}
}
.pull-to-refresh-content {
transform: translate3d(0, 0, 0);
&.transitioning, &.refreshing {
transition: transform 400ms;
}
&:not(.refreshing) {
.pull-to-refresh-layer .preloader {
animation:none;
}
}
&.refreshing {
.pull-to-refresh-arrow {
visibility: hidden;
transition-duration: 0ms;
}
.preloader {
visibility: visible;
}
}
&.pull-up {
.pull-to-refresh-arrow {
transform: rotate(180deg) translate3d(0,0,0);
}
}
}
.pull-to-refresh-content {
top: -@layerHeight;
&.refreshing {
transform: translate3d(0, @layerHeight, 0);
}
}
.bar-nav ~ .pull-to-refresh-content,
.bar-footer ~ .pull-to-refresh-content,
.bar-tab ~ .pull-to-refresh-content {
top: 0;
&.refreshing {
transform: translate3d(0, @layerHeight, 0);
}
}