hjg
2023-11-18 bb48edb3d9faaaeab0088151c86fc24137acdb08
提交 | 用户 | 时间
58d006 1 @scroll-bar-width: 8px;
A 2 @scroll-thin-width: 6px;
3
4
5
6 .ace-scroll {
7     overflow: hidden;
8 }
9 .scroll-content {
10     position: static;
11     overflow: hidden;
12 }
13 .scroll-disabled.ace-scroll {
14   &, & .scroll-content {
15     overflow: visible;
16   }
17 }
18
19
20 .scroll-track {
21   position: absolute;
22   top: auto;
23   bottom: auto;
24   right: 0;
25   
26   //width: @scroll-bar-width;
27   height: auto;// will be determined at runtime
28   background-color: #E7E7E7;
29
30   z-index: 99;//to appear above content
31   
32   width: 0;
33   opacity: 0;
34 }
35 .scroll-bar {
36  position: absolute;
37  top: 0;
38  left: 0;
39  width: inherit;
40  background-color: #ACE;
41
42  background: saturate(darken(#CFDFEA , 5%), 5%);
43 }
44
45
46 .scroll-track.scroll-hz {
47  top: auto;
48  left: auto;
49  right: auto;
50  bottom: 0;
51  
52  height: @scroll-bar-width;
53  width: auto;// will be determined at runtime
54 }
55 .scroll-hz .scroll-bar {
56  height: inherit;
57  width: auto;
58 }
59
60
61
62
63
64 .scroll-track.scroll-active {
65     .transition(~"width 0.25s ease 0.75s, opacity 0.25s ease 0.75s");
66 }
67
68 .ace-scroll:hover .scroll-active,
69 .scroll-active.scroll-track:hover,
70 .scroll-active.scroll-track.scroll-hover,
71 .scroll-active.scroll-track.active,
72 .scroll-active.scroll-track:active
73 {
74     width: @scroll-bar-width;
75     opacity: 1;
76
77     .transition-duration(0.15s);
78     .transition-delay(0s);
79 }
80
81
82
83 .scroll-track.active > .scroll-bar {
84  transition-property: none !important; 
85  transition-duration: 0s !important; 
86 }
87
88
89
90
91
92
93 //optional styling classes
94 .scroll-track.scroll-margin {
95  margin-left: -1px;
96 }
97 .scroll-track.scroll-left {
98   right: auto;
99   left: 0;
100   &.scroll-margin {
101     margin-left: 1px;
102   }
103 }
104
105 //for horizontal
106 .scroll-track.scroll-top {
107   bottom: auto;
108   top: 0;
109
110   &.scroll-margin {
111     top: 1px;
112   }
113 }
114
115 .scroll-dark {
116   .scroll-bar {
117     background-color: transparent;
118     background-color: rgba(0,0,0,0.25);
119     filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='#40000000', endColorstr='#40000000',GradientType=0 )";
120   }
121   .scroll-track& {
122     background-color: transparent;
123     background-color: rgba(0,0,0,0.15);
124     filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='#26000000', endColorstr='#26000000',GradientType=0 )";
125   }
126 }
127 .scroll-light {
128   .scroll-bar {
129     background-color: transparent;
130     background-color: rgba(0,0,0,0.14);
131     filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='#24000000', endColorstr='#24000000',GradientType=0 )";
132   }
133   .scroll-track& {
134     background-color: transparent;
135     background-color: rgba(0,0,0,0.07);
136     filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='#12000000', endColorstr='#12000000',GradientType=0 )";
137   }
138 }
139 .scroll-white {
140   .scroll-bar {
141     background-color: transparent;
142     background-color: rgba(255,255,255,0.33);
143     filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='#55FFFFFF', endColorstr='#55FFFFFF',GradientType=0 )";
144   }
145   .scroll-track& {
146     background-color: transparent;
147     background-color: rgba(255,255,255,0.2);
148     filter: ~"progid:DXImageTransform.Microsoft.gradient( startColorstr='#33FFFFFF', endColorstr='#33FFFFFF',GradientType=0 )";
149   }
150 }
151
152
153 .no-track.scroll-track {
154   background-color: transparent;
155   filter: ~"progid:DXImageTransform.Microsoft.gradient( enabled=false )";
156 }
157
158
159 .scroll-visible {
160     .scroll-track& {
161         opacity: 1;
162         width: @scroll-bar-width;
163     }
164     .scroll-hz& {
165         height: @scroll-bar-width;
166         width: auto;
167     }
168 }
169
170
171 .scroll-thin.scroll-track {
172     &:hover, &.scroll-hover, &:active, &.active, &.scroll-visible {
173         width: @scroll-thin-width;
174     }
175 }
176 .ace-scroll:hover .scroll-thin.scroll-track {
177     width: @scroll-thin-width;
178 }
179
180 //horizontal
181 .scroll-thin.scroll-hz {
182     &:hover, &.scroll-hover, &:active, &.active, &.scroll-visible {
183         width: auto;
184         height: @scroll-thin-width;
185     }
186 }
187 .ace-scroll:hover .scroll-thin.scroll-hz {
188     width: auto;
189     height: @scroll-thin-width;
190 }
191
192
193
194
195 //style like latest version of Chrome
196 .scroll-chrome.scroll-active {
197   .scroll-bar {
198     background-color: transparent;
199     width: 11px;
200     
201     &:before {
202         display: block;
203         content: "";
204         position: absolute;
205         top: 1px;
206         bottom: 3px;
207         left: 1px;
208         right: 1px;
209         
210         background-color: #D9D9D9;
211         border:1px solid #BBB;
212         border-radius: 1px;
213     }
214   }
215   .scroll-track {
216     width: 12px;
217     background-color: #F2F2F2;
218     border: 1px solid;
219     border-width: 1px 0 1px 1px;
220     border-color: #E6E6E6 transparent #E6E6E6 #DBDBDB;
221     
222     &:hover {
223         .scroll-bar:before {
224             background-color: #C0C0C0;
225             border-color: #A6A6A6;
226         }
227     }
228     
229     &.active {
230         .scroll-bar:before {
231             background-color: #A9A9A9;
232             border-color: #8B8B8B;
233         }
234     }
235   }
236 }
237
238
239
240
241 .scroll-active.scroll-track.idle-hide {
242   opacity: 0;
243   filter: ~"alpha(opacity=0)";
244   width: @scroll-bar-width;//to make it hoverable
245
246   &.not-idle {
247      width: @scroll-bar-width;
248      opacity: 1;
249      filter: ~"alpha(opacity=100)";
250   }
251 }
252
253 .scroll-active.scroll-thin.scroll-track.idle-hide {
254     width: @scroll-thin-width;
255 }
256 .scroll-active.scroll-chrome .scroll-track.idle-hide {
257     width: 12px;
258 }
259
260
261
262 //special nav-list scroller case
263 .nav-wrap + .scroll-active .scroll-track {
264     width: @scroll-bar-width;
265 }
266
267 .nav-scroll.scroll-active .scroll-track 
268 {
269     width: @scroll-bar-width;
270     right: 0;
271 }
272 .nav-wrap:hover + .scroll-active .scroll-track ,
273 .nav-scroll.scroll-active:hover .scroll-track
274 {
275     width: @scroll-bar-width;
276     opacity: 1;
277
278     .transition-duration(0.15s);
279     .transition-delay(0s);
280 }
281 .nav-scroll.scroll-active:hover .scroll-track {
282     width: @scroll-bar-width;
283 }
284
285
286
287 .nav-scroll.ace-scroll {
288  & , & .scroll-content {
289     overflow: hidden;
290  }
291 }
292 .nav-scroll.ace-scroll.scroll-disabled {
293  & , & .scroll-content {
294     overflow: visible;
295  }
296 }
297
298
299 .scroll-track.scroll-detached {
300   position: absolute;
301   z-index: @zindex-navbar-fixed - 1;
302   bottom: auto;
303   right: auto;
304 }