Export 0.1.47
[platform/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-left: -16 * @unit_base;
105                 margin-right: -16 * @unit_base;
106                 padding-bottom: 1px;
107
108                 .ui-listview {
109                         margin: 0;
110                 }
111
112         }
113         .ui-listview-inset {
114                 margin: 1em 0;
115         }
116 }
117 .ui-listview,
118 .ui-li {
119         list-style:none;
120         padding:0;
121
122         font-size : @list-font-size-main;
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         h3 {
134                 margin-top      : 0px;
135                 margin-bottom : 0px;
136
137                 font-size : @list-font-size-main;
138                 min-height      : 52 * @unit_base;
139                 font-weight : normal;
140         }
141
142         form {
143                 display : inline-block;
144         }
145         .ui-btn {
146                 top: 50%;
147                 margin-top: -0.8em;
148         }
149         .ui-btn-text {
150                 position: relative;
151                 a.ui-link-inherit {
152                         .LESStext-ellipsis();
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         .ui-btn-inner a.ui-link-inherit,
171         &.ui-li-static {
172                 padding-top : 30 * @unit_base;
173                 padding-bottom : 30 * @unit_base;
174                 padding-left : 16 * @unit_base;
175                 padding-right : 16 * @unit_base;
176                 display: block;
177
178                 white-space: nowrap;    // default: 1line
179         }
180
181         .ui-btn-inner a.ui-link-inherit {
182                 .LESStext-ellipsis();
183         }
184
185
186         .ui-toggleswitch {
187                 &:last-child {
188                         top : 50%;
189                         margin-top : -40 * @unit_base;
190
191                         display : inline-block;
192                         position : absolute;
193
194                         right : 16 * @unit_base;
195                 }
196         }
197
198         [data-role="button"] {
199                 &:last-child {
200                         position : absolute;
201                         right : 16 * @unit_base;
202                 }
203         }
204
205         .ui-radio,
206         .ui-checkbox {
207                 &:first-child{
208                         position : absolute;
209                         top      : 50%;
210                         margin-top : -30 * @unit_base;
211
212                         left : 16 * @unit_base;
213
214                         width : 60 * @unit_base;
215                         height : 60 * @unit_base;
216
217                         .ui-btn-inner {
218                                 padding : 10 * @unit_base 10 * @unit_base 10 * @unit_base 10 * @unit_base;
219                                 line-height : 40 * @unit_base;
220
221                                 color : transparent;
222
223                                 .ui-icon {
224                                         left : 5 * @unit_base;
225                                 }
226                         }
227                 }
228         }
229
230         img.ui-li-bigicon {
231                 position : absolute;
232
233                 top : 50%;
234                 margin-top : -36 * @unit_base;
235
236                 &:first-child {
237                         left : 16 * @unit_base;
238                 }
239
240                 &:nth-child(2) {
241                         left : 92 * @unit_base;
242                 }
243
244                 &:last-child {
245                         right : 16 * @unit_base;
246                 }
247         }
248
249         .ui-li-color-bar + img.ui-li-bigicon:nth-child(2) {
250                 left : 16 * @unit_base;
251         }
252
253         .ui-li-color-bar {
254                 position : absolute;
255                 width  : 12 * @unit_base;
256                 height : 20 * @unit_base;
257
258                 top : 0 * @unit_base;
259                 left : 0 * @unit_base;
260
261                 background-color : rgba(0, 0, 0, 1);
262         }
263 }
264
265 li.ui-li-thumbnail-right {
266         img.ui-li-bigicon.ui-li-thumb {
267                 left : auto;
268                 right : 16 * @unit_base;
269         }
270 }
271
272 .ui-li.ui-li-has-multiline {
273         .ui-btn-inner a.ui-link-inherit,
274         &.ui-li-static {
275                 padding-top : 10 * @unit_base;
276                 padding-bottom : 58 * @unit_base;
277
278                 min-height : 60 * @unit_base;
279         }
280
281         a {
282                 .LESStext-ellipsis();
283                 padding-right : 16 * @unit_base; /* ellipsis for normal text */
284         }
285 }
286
287
288 /********************************************/
289 /*************** Divider ********************/
290 /********************************************/
291 .ui-li-divider {
292         cursor: default;
293
294         counter-reset: listnumbering;
295         font-weight: bold;
296         font-size: @list-font-size-divider;
297         padding-left: 16 * @unit_base;
298         padding-top: 8 * @unit_base;
299         padding-bottom: 8 * @unit_base;
300 }
301
302 .ui-listview .ui-li-divider {
303         &[data-style="dialogue"] {
304                 height: 32 * @unit_base;
305                 padding : 0px;
306
307                 .LESSdialogue-divider;
308                 background : @color_bg;
309         }
310
311         &[data-style="check"] {
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         &[data-style="checkexpandable"] {
321                 height: 60 * @unit_base;
322                 padding-top : 0px;
323                 padding-bottom : 0px;
324
325                 padding-left : 92 * @unit_base;
326                 line-height : 60 * @unit_base;
327         }
328
329         &[data-style="expandable"] {
330                 height: 60 * @unit_base;
331                 padding-top : 0px;
332                 padding-bottom : 0px;
333
334                 line-height : 60 * @unit_base;
335         }
336 }
337
338 .ui-divider-expand-div {
339         position : absolute;
340
341         width : 98 * @unit_base;
342         height : 42 * @unit_base;
343         top : 10 * @unit_base;
344         right : 0px;
345
346         border-left-width : 1px;
347         border-left-style : solid;
348         border-left-color : @color_list_divider_expand_div;
349 }
350
351
352 .ui-li-has-thumb:not(.ui-li-thumbnail-right) {
353         .ui-btn-inner a.ui-link-inherit,
354         &.ui-li-static  {
355                 min-height: 60 * @unit_base;
356                 padding-left: 104 * @unit_base;
357         }
358         .ui-li-text-sub {
359                 padding-left: 104 * @unit_base;
360                 padding-right: 16 * @unit_base; /* ellipsis for sub text */
361         }
362 }
363
364 .ui-li-has-checkbox,
365 .ui-li-has-radio{
366         .ui-btn-inner a.ui-link-inherit,
367         &.ui-li-static  {
368                 min-height: 60 * @unit_base;
369                 padding-left: 92 * @unit_base;
370         }
371         .ui-li-text-sub {
372                 padding-left: 92 * @unit_base;
373         }
374 }
375
376 .ui-li-has-thumb.ui-li-has-checkbox,
377 .ui-li-has-thumb.ui-li-has-radio {
378         .ui-btn-inner a.ui-link-inherit,
379         &.ui-li-static  {
380                 min-height: 60 * @unit_base;
381                 padding-left: 180 * @unit_base;
382         }
383
384         .ui-li-text-sub {
385                 padding-left: 180 * @unit_base;
386         }
387 }
388
389 .ui-li.ui-li-has-right-circle-btn {
390         .ui-btn-inner a {
391                 padding-right : 96 * @unit_base;
392         }
393 }
394
395 .ui-li.ui-li-has-right-btn {
396         .ui-btn-inner a {
397                 padding-right : 256 * @unit_base;
398         }
399 }
400
401 .ui-li.ui-li-thumbnail-right {
402         .ui-btn-inner a {
403                 padding-right : 104 * @unit_base;
404         }
405 }
406 .ui-li.ui-li-static.ui-li-has-right-circle-btn {
407         padding-right : 96 * @unit_base;
408 }
409
410 .ui-li.ui-li-static.ui-li-has-right-btn {
411         padding-right : 256 * @unit_base;
412 }
413
414 .ui-li.ui-li-static.ui-li-thumbnail-right {
415         padding-right : 104 * @unit_base;
416 }
417
418 .ui-li-has-icon {
419         .ui-btn-inner a.ui-link-inherit,
420         &.ui-li-static {
421                 min-height: 20px;
422                 padding-left: 40px;
423         }
424         .ui-li-text-sub {
425                 padding-left: 40px;
426         }
427 }
428
429 .ui-li-heading {
430         font-size: 16px;
431         font-weight: bold;
432         display: block;
433         margin: .6em 0;
434         .LESStext-ellipsis();
435 }
436
437 .ui-li-thumb,
438 .ui-li-icon {
439         position: absolute;
440         left: 1px;
441         top: 0;
442         max-height: @list-bigicon-size2;
443         max-width: @list-bigicon-size2;
444 }
445
446 .ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner {
447         border-top: 0px;
448 }
449
450 .ui-li-sub,
451 .ui-li-sub-setting {
452         float: right;
453         text-align: right;
454         font-size: @font_size_list_sub_text;
455         margin: .3em 0;
456 }
457
458 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
459 /* ~~~~~~~~~~~~~~              NEW   LIST   STYLE                   ~~~~~~~~~ */
460 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
461 .ui-li-text-sub {
462         float: right;
463         text-align: right;
464         font-size: @font_size_list_sub_text;
465         color: @color_list_sub_text_default;
466
467         position : absolute;
468         right : 16 * @unit_base;
469         top : 16 * @unit_base;
470
471         width   : 95%;
472         .LESStext-ellipsis();
473
474         > img {
475                 position : relative;
476                 width: @list-smallicon-size;
477                 height: @list-smallicon-size;
478                 margin: 0 @list-li-padding-horizontal 0 @list-li-padding-horizontal;
479         }
480 }
481
482 .ui-li-text-sub2 {
483         float: right;
484         text-align: right;
485         font-size: @font_size_list_sub_text;
486         color: @color_list_sub_text_default;
487
488         position : absolute;
489         right : 16 * @unit_base;
490         top : 16 * @unit_base;
491
492         width : 60%;
493         .LESStext-ellipsis();
494
495         > img {
496                 width: @list-smallicon-size;
497                 height: @list-smallicon-size;
498                 margin: 0 0 0 @list-li-padding-horizontal;
499         }
500 }
501 /*
502 li:not(.ui-li-has-multiline) .ui-li-text-sub {
503         position : absolute;
504         right : 16 * @unit_base;
505         top: 22 * @unit_base;
506         margin-top: 0px;
507 }*/
508 .ui-li-has-multiline .ui-li-text-sub {
509         position : absolute;
510
511         text-align: left;
512         right : auto;
513         left : 16 * @unit_base;
514         top: 70 * @unit_base;
515         margin-top: 0px;
516
517         width : 90%;
518         .LESStext-ellipsis();
519 }
520
521 .ui-li-icon-sub-right,
522 .ui-li-icon-sub {
523         position: absolute;
524         left: auto;
525         width: @list-smallicon-size;
526         height: @list-smallicon-size;
527         margin: 0 0;
528 }
529 .ui-li-icon-sub-right {
530         right : 16 * @unit_base;
531 }
532
533
534
535 // =========
536 // Dialogue
537 // =========
538 .ui-listview {
539         &> li.ui-li-dialogue {
540                 margin-left: @style_list_li_dialogue_margin_left;
541                 margin-right : @style_list_li_dialogue_margin_left;
542                 border-left: @style_list_li_dialogue_border_left_width @color_dialogue_editor_border solid;
543                 //margin-left: @style_list_li_dialogue_margin_left;
544                 border-top-width: 0px;
545
546                 .LESSdialogue-border-style;
547         }
548
549         &> li.ui-li-dialogue.ui-body-s,
550         &> li.ui-li-dialogue.ui-btn-hover-up-s:not(.ui-btn-down-s),
551         &> li.ui-li-dialogue.ui-btn-up-s {
552                 &:not(.ui-li-expanded){
553                         background : @color_list_dialogue_bg;
554                 }
555         }
556         &> li.ui-li-dialogue.ui-li-expanded {
557                 padding-left : 44 * @unit_base;
558                 min-height : 52 * @unit_base;
559         }
560
561
562         &> li.ui-li-dialogue.ui-li-divider {
563                 height: 32 * @unit_base;
564                 padding : 0px;
565         }
566
567         &> li.ui-li-group-title {
568                 padding-top : 32 * @unit_base;
569         }
570
571         &> li.ui-li-group-title span {
572                 padding-left : 16 * @unit_base;
573         }
574         &> li.ui-li-dialogue-divider {
575                 .LESSdialogue-divider;
576         }
577 }
578
579 // =========
580 // bubble li
581 // =========
582 .ui-listview {
583         .ui-li-bubble-left,
584                 .ui-li-bubble-right,
585                 .ui-li-bubble-sos {
586                 img {
587                         position: relative;
588                         min-width: 160 * @unit_base;
589                         min-height: 160 * @unit_base;
590                 }
591         }
592         .ui-li-bubble-left {
593                 word-wrap: break-word;
594                 .LESSborder-radius-topright(@list-li-bubble-corner-radius);
595                 .LESSborder-radius-bottomright(@list-li-bubble-corner-radius);
596                 font-size: @list-li-bubble-font-size;
597                 p, span {
598                         font-size: @list-li-bubble-font-size;
599                 }
600                 //margin: 12px 20% 12px 0%;
601                 margin-top: 12 * @unit_base;
602                 margin-bottom: 12 * @unit_base;
603                 margin-left: 0;
604                 margin-right: auto;
605                 max-width: 80%;
606                 min-width: 30%;
607                 padding: 16px 22px 16px 16px;
608         }
609         .ui-li-bubble-right {
610                 word-wrap: break-word;
611                 .LESSborder-radius-topleft(@list-li-bubble-corner-radius);
612                 .LESSborder-radius-bottomleft(@list-li-bubble-corner-radius);
613                 margin: 12px 0% 12px 20%;
614                 padding: 16px 16px 16px 22px;
615         }
616         .ui-li-bubble-sos {
617         }
618         .ui-li-bubble-date {
619                 height: 40 * @unit_base;
620                 font-size: @list-li-bubble-date-font-size;
621                 margin: 12px 0%;        // no horizontal margin
622                 padding: 0% 16px;
623                 padding-top: 15px;
624                 text-align: @style_list_bubble_date_text_align;
625         }
626         span.ui-li-bubble-time {
627                 margin-left: 12px;
628                 font-size: @list-li-bubble-time-font-size;
629                 display: inline-block;
630         }
631 }
632
633 // Expandable list animation
634
635 @-webkit-keyframes ui-expand-show {
636         from {
637                 -webkit-transform-origin: 0% 0%;
638                 -webkit-transform: rotateX(90deg) skewX(30deg) translateZ(0);
639         } to {
640                 -webkit-transform-origin: 0% 0%;
641                 -webkit-transform: rotateX(0deg) skewX(0deg) translateZ(0);
642         }
643 }
644 .ui-listview {
645         .ui-li-expandable {
646         }
647         .ui-li-expandable-shown {
648                 // Down arrow
649                 .LESSimg-expanded-icon;
650         }
651         .ui-li-expandable-hidden {
652                 // Right arrow
653                 .LESSimg-expand-icon;
654         }
655         .ui-li-expanded {
656                 overflow-x: hidden;
657         }
658         .ui-li-expand-transition-show {
659                 visibility: visible;
660                 -webkit-animation: ui-expand-show 0.4s 1 ease-out;
661         }
662         .ui-li-expand-transition-hide {
663                 visibility: hidden;
664                 height: 0px !important;
665                 min-height: 0px !important;
666                 padding-top: 0px;
667                 padding-bottom: 0px;
668                 border: 0px;
669                 -webkit-transition: all 0.2s ease;
670                 -moz-transition: all 0.2s ease;
671                 -o-transition: all 0.2s ease;
672                 transition: all 0.2s ease;
673         }
674 }
675
676
677 .LESSimg-expand-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) {
678         .ui-li-expand-icon {
679                 background-image: url(images/00_button_expand_closed.png);
680                 background-size: 100%;
681                 position: absolute;
682                 top: 50%;
683                 width: 64 * @unit_base;
684                 height: 64 * @unit_base;
685                 margin-top: -(@size/2);
686                 right: 16 * @unit_base;
687         }
688 }
689
690 .LESSimg-expanded-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) {
691         .ui-li-expanded-icon {
692                 background-image: url(images/00_button_expand_opened.png);
693                 background-size: 100%;
694                 position: absolute;
695                 top: 50%;
696                 width: 64 * @unit_base;
697                 height: 64 * @unit_base;
698                 margin-top: -(@size/2);
699                 right: 16 * @unit_base;
700         }
701 }