-
Notifications
You must be signed in to change notification settings - Fork 786
/
Copy pathtiny-slider.scss
executable file
·144 lines (137 loc) · 2.89 KB
/
tiny-slider.scss
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Version: 2.9.4
.tns-outer {
padding: 0 !important; // remove padding: clientWidth = width + padding (0) = width
[hidden] { display: none !important; }
[aria-controls], [data-action] { cursor: pointer; }
}
.tns-slider {
-webkit-transition: all 0s;
-moz-transition: all 0s;
transition: all 0s;
> .tns-item {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
}
.tns-horizontal {
&.tns-subpixel {
white-space: nowrap;
> .tns-item {
display: inline-block;
vertical-align: top;
white-space: normal;
}
}
&.tns-no-subpixel {
&:after {
content: '';
display: table;
clear: both;
}
> .tns-item {
float: left;
}
}
&.tns-carousel {
&.tns-no-subpixel {
> .tns-item {
margin-right: -100%;
}
}
}
}
.tns-no-calc {
position: relative;
left: 0;
}
.tns-gallery {
position: relative;
left: 0;
min-height: 1px; // make sure slider container is visible
// overflow: hidden;
> .tns-item {
position: absolute;
left: -100%;
-webkit-transition: transform 0s, opacity 0s;
-moz-transition: transform 0s, opacity 0s;
transition: transform 0s, opacity 0s;
}
> .tns-slide-active {
position: relative;
left: auto !important;
}
> .tns-moving {
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
transition: all 0.25s;
}
}
.tns-autowidth { display: inline-block; }
.tns-lazy-img {
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
transition: opacity 0.6s;
opacity: 0.6;
&.tns-complete { opacity: 1; }
}
.tns-ah {
-webkit-transition: height 0s;
-moz-transition: height 0s;
transition: height 0s;
}
.tns-ovh { overflow: hidden; }
.tns-visually-hidden { position: absolute; left: -10000em; }
.tns-transparent { opacity: 0; visibility: hidden; }
.tns-fadeIn {
opacity: 1;
filter: alpha(opacity=100);
z-index: 0;
}
.tns-normal, .tns-fadeOut {
opacity: 0;
filter: alpha(opacity=0);
z-index: -1;
}
// *** Fix a viewport issue in initialization
.tns-vpfix {
white-space: nowrap;
> div, > li {
display: inline-block;
}
}
// *** Detecting browser capability ***
$width: 310px;
$height: 10px;
$count: 70;
$perpage: 3;
.tns-t {
&-subp2 {
margin: 0 auto;
width: $width;
position: relative;
height: $height;
overflow: hidden;
}
&-ct {
width: (100% * $count / $perpage);
width: -webkit-calc(100% * #{$count} / #{$perpage});
width: -moz-calc(100% * #{$count} / #{$perpage});
width: calc(100% * #{$count} / #{$perpage});
position: absolute;
right: 0;
&:after {
content: '';
display: table;
clear: both;
}
> div {
width: (100% / $count);
width: -webkit-calc(100% / #{$count});
width: -moz-calc(100% / #{$count});
width: calc(100% / #{$count});
height: $height;
float: left;
}
}
}