9703d2fb143e0345fc8ff79859038910287779e1
[framework/web/web-ui-fw.git] / src / themes / tizen / common / jquery.mobile.listview.less
1 /*
2 * jQuery Mobile Framework
3 * Copyright (c) jQuery Project
4 * Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
5 */
6
7 /*** less definitions ***/
8
9 @import "config.less";
10
11 /* Using font size */
12 @list-font-size-main:   44 * @unit_base;
13 @list-font-size-sub:    32 * @unit_base;
14 @list-font-size-divider: 32 * @unit_base;       // NOTE: defined in dialogue group
15
16 /*
17 @list-dialogue-font-size-main:  38 * @unit_base;
18 @list-dialogue-font-size-sub:   32 * @unit_base;
19 */
20
21 @list-font-weight:              normal;
22
23 /*
24 @list-li-height: 112 * @unit_base;
25
26 @list-li-2line-height: 128 * @unit_base;
27 @list-li-3line-height: 160 * @unit_base;
28 @list-li-top-padding: 10 * @unit_base;
29 @list-li-main-line-height: 60 * @unit_base;
30 @list-li-sub-line-height: 48 * @unit_base;
31 */      
32 @list-smallicon-size: 32 * @unit_base;
33 @list-li-padding-horizontal: 16 * @unit_base;
34 /*
35 @list-li-divider-height: 32 * @unit_base;
36
37 */
38 @list-bigicon-size: 64 * @unit_base;
39 @list-bigicon-size2: 72 * @unit_base;
40 /*
41 @list-checkbox-size: 42 * @unit_base;
42 @list-progressbar-height: 16 * @unit_base;
43 */
44
45
46 // Bubble
47 @list-li-bubble-font-size: 38 * @unit_base;
48 @list-li-bubble-time-font-size: 26 * @unit_base;
49 @list-li-bubble-date-font-size: @list-li-bubble-time-font-size;
50 @list-li-bubble-corner-radius: 9 * @unit_base;  // TODO: fit to 9px (picked from bg images)
51
52 @list-li-sub-left-width: 187 * @unit_base;
53 @list-li-main-right-padding: 187 * @unit_base;
54
55 //Email
56 @list-li-email-top-padding: 8 * @unit_base;
57 @list-li-email-subline-top-padding: 4 * @unit_base;
58 @list-li-email-sub-line-height: 40 * @unit_base;
59 @list-email-icon-width: 56 * @unit_base;
60 @list-email-icon-height: 60 * @unit_base;
61
62 @list-email-icon-top-padding: 16 * @unit_base;
63 @list-email-attach-icon-width: 40 * @unit_base;
64 @list-email-attach-icon-height: 40 * @unit_base;
65 @list-email-warning-icon-width: 30 * @unit_base;
66 @list-email-warning-icon-height: 30 * @unit_base;
67 @list-email-text-padding-left: 60 * @unit_base;
68
69 /************************/
70
71 .ui-listview {
72         margin: 0;
73         counter-reset: listnumbering;
74         border-top-width: 1px;
75         border-top-style: solid;
76
77         li.ui-btn > .ui-btn-hastxt > .ui-btn-text.ui-btn-text-padding-right {
78                 padding-right: 0 * @unit_base;  // Clear default button padding-right
79         }
80
81         &> .ui-li {
82                 // list item separator line
83                 border-bottom-width: 1px;
84                 border-bottom-style: solid;
85
86                 border-top-width: 0px;
87         }
88
89         &> .ui-li:not(.ui-li-divider) {
90                 &:not(.ui-li-static) {
91                         min-height : 112 * @unit_base;
92                 }
93         }
94
95         &> .ui-li.ui-li-has-multiline:not(.ui-li-divider) {
96                 &:not(.ui-li-static) {
97                         min-height : 128 * @unit_base;
98                 }
99         }
100 }
101
102 .ui-content {
103         .ui-listview {
104                 margin: -16 * @unit_base;
105                 padding-bottom: 1px;
106
107                 .ui-listview {
108                         margin: 0;
109                 }
110
111         }
112         .ui-listview-inset {
113                 margin: 1em 0;
114         }
115 }
116 .ui-listview,
117 .ui-li {
118         list-style:none;
119         padding:0;
120
121         font-size : @list-font-size-main;
122
123 }
124 .ui-li,
125 .ui-li.ui-field-contain {
126         display: block;
127         margin:0;
128         position: relative;
129         overflow: visible;
130         text-align: left;
131 }
132 .ui-li {
133         
134         h3 {
135                 margin-top      : 0px;
136                 margin-bottom : 0px;
137
138                 font-size : @list-font-size-main;
139                 min-height      : 52 * @unit_base;
140                 font-weight : normal;
141         }
142         .ui-btn {
143                 top: 50%;
144                 margin-top: -0.8em;
145         }
146         .ui-btn-text {
147                 position: relative;
148
149                 a.ui-link-inherit {
150                         text-overflow: ellipsis;
151                         overflow: hidden;
152                         white-space: nowrap;
153                 }
154         }
155         &:last-child,
156         &.ui-field-contain:last-child {
157                 border-bottom-width: 1px;
158         }
159         &>.ui-btn-inner {
160                 display: block;
161                 position: relative;
162                 padding: 0;
163                 border-width:0;
164         }
165
166         &>.ui-btn-inner.ui-btn-hastxt {
167                 padding: 0px 0px;
168                 
169         }
170
171         .ui-btn-inner a.ui-link-inherit,
172         &.ui-li-static {
173                 padding-top : 30 * @unit_base;
174                 padding-bottom : 30 * @unit_base;
175                 padding-left : 16 * @unit_base;
176                 padding-right : 16 * @unit_base;
177                 display: block;
178         }
179
180         .ui-toggleswitch {
181                 &:last-child {
182                         top : 50%;
183                         margin-top : -40 * @unit_base;
184
185                         display : inline-block;
186                         position : absolute;
187
188                         right : 16 * @unit_base;
189                 }
190         }
191
192         [data-role="button"] {
193                 &:last-child {
194                         position : absolute;
195                         right : 16 * @unit_base;
196                 }
197         }
198
199         .ui-radio,
200         .ui-checkbox {
201                 &:first-child{
202                         position : absolute;
203                         top      : 50%;
204                         margin-top : -30 * @unit_base;
205
206                         left : 16 * @unit_base;
207
208                         width : 60 * @unit_base;
209                         height : 60 * @unit_base;
210
211                         .ui-btn-inner {
212                                 padding : 10 * @unit_base 10 * @unit_base 10 * @unit_base 10 * @unit_base;
213                                 line-height : 40 * @unit_base;
214
215                                 color : transparent;
216
217                                 .ui-icon {
218                                         left : 5 * @unit_base;
219                                 }
220                         }
221                 }
222         }
223
224         img.ui-li-bigicon {
225                 position : absolute;
226
227                 top : 50%;
228                 margin-top : -36 * @unit_base;
229
230                 &:first-child {
231                         left : 16 * @unit_base;
232                 }
233
234                 &:nth-child(2) {
235                         left : 92 * @unit_base;
236                 }
237
238                 &:last-child {
239                         right : 16 * @unit_base;
240                 }
241         }
242
243         .ui-li-color-bar + img.ui-li-bigicon:nth-child(2) {
244                 left : 16 * @unit_base;
245         }
246
247         .ui-li-color-bar {
248                 position : absolute;
249                 width  : 12 * @unit_base;
250                 height : 20 * @unit_base;
251
252                 top : 0 * @unit_base;
253                 left : 0 * @unit_base;
254
255                 background-color : rgba(0, 0, 0, 1);
256         }
257 }
258
259 li.ui-li-thumbnail-right {
260         img.ui-li-bigicon.ui-li-thumb {
261                 left : auto;
262                 right : 16 * @unit_base;
263         }
264 }
265
266 .ui-li.ui-li-has-multiline {
267         .ui-btn-inner a.ui-link-inherit,
268         &.ui-li-static {
269                 padding-top : 10 * @unit_base;
270                 padding-bottom : 58 * @unit_base;
271 /*              padding-left : 16 * @unit_base;
272                 padding-right : 16 * @unit_base;
273                 display: block;*/
274
275                 min-height : 60 * @unit_base;
276         }
277 }
278
279
280 /********************************************/
281 /*************** Divider ********************/
282 /********************************************/
283 .ui-li-divider {
284         cursor: default;
285
286         counter-reset: listnumbering;
287         font-weight: bold;
288         font-size: @list-font-size-divider;
289         padding-left: 16 * @unit_base;
290         padding-top: 8 * @unit_base;
291         padding-bottom: 8 * @unit_base;
292 }
293
294 .ui-listview .ui-li-divider {
295         &[data-style="dialogue"] {
296                 height: 32 * @unit_base;
297                 padding : 0px;
298
299                 .LESSdialogue-divider;
300         }
301
302         &[data-style="check"] {
303                 height: 60 * @unit_base;
304                 padding-top : 0px;
305                 padding-bottom : 0px;
306
307                 padding-left : 92 * @unit_base;
308                 line-height : 60 * @unit_base;
309         }
310
311         &[data-style="checkexpandable"] {
312                 height: 60 * @unit_base;
313                 padding-top : 0px;
314                 padding-bottom : 0px;
315
316                 padding-left : 92 * @unit_base;
317                 line-height : 60 * @unit_base;
318         }
319 }
320
321 .ui-divider-expand-div {
322
323
324 }
325
326
327 .ui-li-has-thumb:not(.ui-li-thumbnail-right) {
328         .ui-btn-inner a.ui-link-inherit,
329         &.ui-li-static  {
330                 min-height: 60 * @unit_base;
331                 padding-left: 104 * @unit_base;
332         }
333         .ui-li-text-sub {
334                 padding-left: 104 * @unit_base;
335         }
336 }
337
338 .ui-li-has-checkbox,
339 .ui-li-has-radio{
340         .ui-btn-inner a.ui-link-inherit,
341         &.ui-li-static  {
342                 min-height: 60 * @unit_base;
343                 padding-left: 92 * @unit_base;
344         }
345         .ui-li-text-sub {
346                 padding-left: 92 * @unit_base;
347         }
348 }
349
350 .ui-li-has-thumb.ui-li-has-checkbox,
351 .ui-li-has-thumb.ui-li-has-radio {
352         .ui-btn-inner a.ui-link-inherit,
353         &.ui-li-static  {
354                 min-height: 60 * @unit_base;
355                 padding-left: 180 * @unit_base;
356         }
357
358         .ui-li-text-sub {
359                 padding-left: 180 * @unit_base;
360         }
361 }
362
363 .ui-li-has-icon {
364         .ui-btn-inner a.ui-link-inherit,
365         &.ui-li-static {
366                 min-height: 20px;
367                 padding-left: 40px;
368         }
369         .ui-li-text-sub {
370                 padding-left: 40px;
371         }
372 }
373
374 .ui-li-heading {
375         font-size: 16px;
376         font-weight: bold;
377         display: block;
378         margin: .6em 0;
379         text-overflow: ellipsis;
380         overflow: hidden;
381         white-space: nowrap;
382 }
383
384 .ui-li-thumb,
385 .ui-li-icon {
386         position: absolute;
387         left: 1px;
388         top: 0;
389         max-height: @list-bigicon-size2;
390         max-width: @list-bigicon-size2;
391 }
392
393 .ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner {
394         border-top: 0px;
395 }
396
397 .ui-li-sub,
398 .ui-li-sub-setting {
399         float: right;
400         text-align: right;
401         font-size: @font_size_list_sub_text;
402         margin: .3em 0;
403 }
404
405 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
406 /* ~~~~~~~~~~~~~~              NEW   LIST   STYLE                   ~~~~~~~~~ */
407 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
408 .ui-li-text-sub {
409         float: right;
410         text-align: right;
411         font-size: @font_size_list_sub_text;
412         color: @color_list_sub_text_default;
413 /*      top: 50%;
414         margin-top: -0.5em;*/
415
416         position : absolute;
417         right : 16 * @unit_base;
418         top : 16 * @unit_base;
419                 > img {
420                         position : relative;
421                         width: @list-smallicon-size;
422                         height: @list-smallicon-size;
423                         margin: 0 @list-li-padding-horizontal 0 @list-li-padding-horizontal;
424                 }
425 }
426
427 .ui-li-text-sub2 {
428         float: right;
429         text-align: right;
430         font-size: @font_size_list_sub_text;
431         color: @color_list_sub_text_default;
432
433         position : absolute;
434         right : 16 * @unit_base;
435         top : 16 * @unit_base;
436
437                 > img {
438                         width: @list-smallicon-size;
439                         height: @list-smallicon-size;
440                         margin: 0 0 0 @list-li-padding-horizontal;
441                 }
442 }
443 /*
444 li:not(.ui-li-has-multiline) .ui-li-text-sub {
445         position : absolute;
446
447         right : 16 * @unit_base;
448         top: 22 * @unit_base;
449         margin-top: 0px;
450 }*/
451 .ui-li-has-multiline .ui-li-text-sub {
452         position : absolute;
453
454         right : auto;
455         left : 16 * @unit_base;
456         top: 70 * @unit_base;
457         margin-top: 0px;
458
459 }
460
461 .ui-li-icon-sub-right,
462 .ui-li-icon-sub {
463         position: absolute;
464         left: auto;
465         width: @list-smallicon-size;
466         height: @list-smallicon-size;
467         margin: 0 0;
468 }
469 .ui-li-icon-sub-right {
470         right : 16 * @unit_base;
471 }
472
473
474
475 // =========
476 // Dialogue
477 // =========
478 .ui-listview {
479         &> li.ui-li-dialogue {
480                 margin-left: @style_list_li_dialogue_margin_left;
481                 margin-right : @style_list_li_dialogue_margin_left;
482                 border-left: @style_list_li_dialogue_border_left_width @color_dialogue_editor_border solid;
483                 //margin-left: @style_list_li_dialogue_margin_left;
484                 border-top-width: 0px;
485
486                 .LESSdialogue-border-style;
487         }
488
489         &> li.ui-li-dialogue.ui-body-s,
490         &> li.ui-li-dialogue.ui-btn-hover-up-s:not(.ui-btn-down-s),
491         &> li.ui-li-dialogue.ui-btn-up-s {
492                 &:not(.ui-li-expanded){
493                         background : @color_list_dialogue_bg;
494                 }
495         }
496
497         &> li.ui-li-dialogue.ui-li-divider {
498                 height: 32 * @unit_base;
499                 padding : 0px;
500         }
501
502         &> li.ui-li-group-title {
503                 padding-top : 32 * @unit_base;
504         }
505
506         &> li.ui-li-group-title span {
507                 padding-left : 16 * @unit_base;
508         }
509         &> li.ui-li-dialogue-divider {
510                 .LESSdialogue-divider;
511         }
512 }
513
514 // =========
515 // bubble li
516 // =========
517 .ui-listview {
518         .ui-li-bubble-left,
519                 .ui-li-bubble-right,
520                 .ui-li-bubble-sos {
521                 img {
522                         position: relative;
523                         min-width: 160 * @unit_base;
524                         min-height: 160 * @unit_base;
525                 }
526         }
527         .ui-li-bubble-left {
528                 word-wrap: break-word;
529                 .LESSborder-radius-topright(@list-li-bubble-corner-radius);
530                 .LESSborder-radius-bottomright(@list-li-bubble-corner-radius);
531                 font-size: @list-li-bubble-font-size;
532                 p, span {
533                         font-size: @list-li-bubble-font-size;
534                 }
535                 //margin: 12px 20% 12px 0%;
536                 margin-top: 12 * @unit_base;
537                 margin-bottom: 12 * @unit_base;
538                 margin-left: 0;
539                 margin-right: auto;
540                 max-width: 80%;
541                 min-width: 30%;
542                 padding: 16px 22px 16px 16px;
543         }
544         .ui-li-bubble-right {
545                 word-wrap: break-word;
546                 .LESSborder-radius-topleft(@list-li-bubble-corner-radius);
547                 .LESSborder-radius-bottomleft(@list-li-bubble-corner-radius);
548                 margin: 12px 0% 12px 20%;
549                 padding: 16px 16px 16px 22px;
550         }
551         .ui-li-bubble-sos {
552         }
553         .ui-li-bubble-date {
554                 height: 40 * @unit_base;
555                 font-size: @list-li-bubble-date-font-size;
556                 margin: 12px 0%;        // no horizontal margin
557                 padding: 0% 16px;
558                 padding-top: 15px;
559                 text-align: @style_list_bubble_date_text_align;
560         }
561         span.ui-li-bubble-time {
562                 margin-left: 12px;
563                 font-size: @list-li-bubble-time-font-size;
564                 display: inline-block;
565         }
566 }
567
568 // Expandable list animation
569
570 @-webkit-keyframes ui-expand-show {
571         from {
572                 -webkit-transform-origin: 0% 0%;
573                 -webkit-transform: rotateX(90deg) skewX(30deg) translateZ(0);
574         } to {
575                 -webkit-transform-origin: 0% 0%;
576                 -webkit-transform: rotateX(0deg) skewX(0deg) translateZ(0);
577         }
578 }
579 .ui-listview {
580         .ui-li-expandable {
581         }
582         .ui-li-expandable-shown {
583                 // Down arrow
584                 .LESSimg-expanded-icon;
585         }
586         .ui-li-expandable-hidden {
587                 // Right arrow
588                 .LESSimg-expand-icon;
589         }
590         .ui-li-expanded {
591                 overflow: hidden;
592         }
593         .ui-li-expand-transition-show {
594                 visibility: visible;
595                 -webkit-animation: ui-expand-show 0.4s 1 ease-out;
596         }
597         .ui-li-expand-transition-hide {
598                 visibility: hidden;
599                 height: 0px !important;
600                 min-height: 0px !important;
601                 padding-top: 0px;
602                 padding-bottom: 0px;
603                 border: 0px;
604                 -webkit-transition: all 0.2s ease;
605                 -moz-transition: all 0.2s ease;
606                 -o-transition: all 0.2s ease;
607                 transition: all 0.2s ease;
608         }
609 }
610
611
612 .LESSimg-expand-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) {
613         .ui-li-expand-icon {
614                 background-image: url(images/00_button_expand_closed.png);
615                 background-size: 100%;
616                 position: absolute;
617                 top: 50%;
618                 width: 64 * @unit_base;
619                 height: 64 * @unit_base;
620                 margin-top: -(@size/2);
621                 right: 16 * @unit_base;
622         }
623 }
624
625 .LESSimg-expanded-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) {
626         .ui-li-expanded-icon {
627                 background-image: url(images/00_button_expand_opened.png);
628                 background-size: 100%;
629                 position: absolute;
630                 top: 50%;
631                 width: 64 * @unit_base;
632                 height: 64 * @unit_base;
633                 margin-top: -(@size/2);
634                 right: 16 * @unit_base;
635         }
636 }