2 * jQuery Mobile Framework
3 * Copyright (c) jQuery Project
4 * Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
7 /*** less definitions ***/
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
17 @list-dialogue-font-size-main: 38 * @unit_base;
18 @list-dialogue-font-size-sub: 32 * @unit_base;
21 @list-font-weight: normal;
24 @list-li-height: 112 * @unit_base;
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;
32 @list-smallicon-size: 32 * @unit_base;
33 @list-li-padding-horizontal: 16 * @unit_base;
35 @list-li-divider-height: 32 * @unit_base;
38 @list-bigicon-size: 64 * @unit_base;
39 @list-bigicon-size2: 72 * @unit_base;
41 @list-checkbox-size: 42 * @unit_base;
42 @list-progressbar-height: 16 * @unit_base;
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)
52 @list-li-sub-left-width: 187 * @unit_base;
53 @list-li-main-right-padding: 187 * @unit_base;
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;
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;
69 /************************/
73 counter-reset: listnumbering;
74 border-top-width: 1px;
75 border-top-style: solid;
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
82 // list item separator line
83 border-bottom-width: 1px;
84 border-bottom-style: solid;
86 border-top-width: 0px;
89 &> .ui-li:not(.ui-li-divider) {
90 &:not(.ui-li-static) {
91 min-height : 112 * @unit_base;
95 &> .ui-li.ui-li-has-multiline:not(.ui-li-divider) {
96 &:not(.ui-li-static) {
97 min-height : 128 * @unit_base;
104 margin-left: -16 * @unit_base;
105 margin-right: -16 * @unit_base;
122 font-size : @list-font-size-main;
125 .ui-li.ui-field-contain {
137 font-size : @list-font-size-main;
138 min-height : 52 * @unit_base;
139 font-weight : normal;
143 display : inline-block;
152 .LESStext-ellipsis();
156 &.ui-field-contain:last-child {
157 border-bottom-width: 1px;
166 &>.ui-btn-inner.ui-btn-hastxt {
170 .ui-btn-inner a.ui-link-inherit,
172 padding-top : 30 * @unit_base;
173 padding-bottom : 30 * @unit_base;
174 padding-left : 16 * @unit_base;
175 padding-right : 16 * @unit_base;
178 white-space: nowrap; // default: 1line
181 .ui-btn-inner a.ui-link-inherit {
182 .LESStext-ellipsis();
189 margin-top : -40 * @unit_base;
191 display : inline-block;
194 right : 16 * @unit_base;
198 [data-role="button"] {
201 right : 16 * @unit_base;
210 margin-top : -30 * @unit_base;
212 left : 16 * @unit_base;
214 width : 60 * @unit_base;
215 height : 60 * @unit_base;
218 padding : 10 * @unit_base 10 * @unit_base 10 * @unit_base 10 * @unit_base;
219 line-height : 40 * @unit_base;
224 left : 5 * @unit_base;
234 margin-top : -36 * @unit_base;
237 left : 16 * @unit_base;
241 left : 92 * @unit_base;
245 right : 16 * @unit_base;
249 .ui-li-color-bar + img.ui-li-bigicon:nth-child(2) {
250 left : 16 * @unit_base;
255 width : 12 * @unit_base;
256 height : 20 * @unit_base;
258 top : 0 * @unit_base;
259 left : 0 * @unit_base;
261 background-color : rgba(0, 0, 0, 1);
265 li.ui-li-thumbnail-right {
266 img.ui-li-bigicon.ui-li-thumb {
268 right : 16 * @unit_base;
272 .ui-li.ui-li-has-multiline {
273 .ui-btn-inner a.ui-link-inherit,
275 padding-top : 10 * @unit_base;
276 padding-bottom : 58 * @unit_base;
278 min-height : 60 * @unit_base;
282 .LESStext-ellipsis();
283 padding-right : 16 * @unit_base; /* ellipsis for normal text */
288 /********************************************/
289 /*************** Divider ********************/
290 /********************************************/
294 counter-reset: listnumbering;
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;
302 .ui-listview .ui-li-divider {
303 &[data-style="dialogue"] {
304 height: 32 * @unit_base;
307 .LESSdialogue-divider;
308 background : @color_bg;
311 &[data-style="check"] {
312 height: 60 * @unit_base;
314 padding-bottom : 0px;
316 padding-left : 92 * @unit_base;
317 line-height : 60 * @unit_base;
320 &[data-style="checkexpandable"] {
321 height: 60 * @unit_base;
323 padding-bottom : 0px;
325 padding-left : 92 * @unit_base;
326 line-height : 60 * @unit_base;
329 &[data-style="expandable"] {
330 height: 60 * @unit_base;
332 padding-bottom : 0px;
334 line-height : 60 * @unit_base;
338 .ui-divider-expand-div {
341 width : 98 * @unit_base;
342 height : 42 * @unit_base;
343 top : 10 * @unit_base;
346 border-left-width : 1px;
347 border-left-style : solid;
348 border-left-color : @color_list_divider_expand_div;
352 .ui-li-has-thumb:not(.ui-li-thumbnail-right) {
353 .ui-btn-inner a.ui-link-inherit,
355 min-height: 60 * @unit_base;
356 padding-left: 104 * @unit_base;
359 padding-left: 104 * @unit_base;
360 padding-right: 16 * @unit_base; /* ellipsis for sub text */
366 .ui-btn-inner a.ui-link-inherit,
368 min-height: 60 * @unit_base;
369 padding-left: 92 * @unit_base;
372 padding-left: 92 * @unit_base;
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,
380 min-height: 60 * @unit_base;
381 padding-left: 180 * @unit_base;
385 padding-left: 180 * @unit_base;
389 .ui-li.ui-li-has-right-circle-btn {
391 padding-right : 96 * @unit_base;
395 .ui-li.ui-li-has-right-btn {
397 padding-right : 256 * @unit_base;
401 .ui-li.ui-li-thumbnail-right {
403 padding-right : 104 * @unit_base;
406 .ui-li.ui-li-static.ui-li-has-right-circle-btn {
407 padding-right : 96 * @unit_base;
410 .ui-li.ui-li-static.ui-li-has-right-btn {
411 padding-right : 256 * @unit_base;
414 .ui-li.ui-li-static.ui-li-thumbnail-right {
415 padding-right : 104 * @unit_base;
419 .ui-btn-inner a.ui-link-inherit,
434 .LESStext-ellipsis();
442 max-height: @list-bigicon-size2;
443 max-width: @list-bigicon-size2;
446 .ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner {
454 font-size: @font_size_list_sub_text;
458 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
459 /* ~~~~~~~~~~~~~~ NEW LIST STYLE ~~~~~~~~~ */
460 /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
464 font-size: @font_size_list_sub_text;
465 color: @color_list_sub_text_default;
468 right : 16 * @unit_base;
469 top : 16 * @unit_base;
472 .LESStext-ellipsis();
476 width: @list-smallicon-size;
477 height: @list-smallicon-size;
478 margin: 0 @list-li-padding-horizontal 0 @list-li-padding-horizontal;
485 font-size: @font_size_list_sub_text;
486 color: @color_list_sub_text_default;
489 right : 16 * @unit_base;
490 top : 16 * @unit_base;
493 .LESStext-ellipsis();
496 width: @list-smallicon-size;
497 height: @list-smallicon-size;
498 margin: 0 0 0 @list-li-padding-horizontal;
502 li:not(.ui-li-has-multiline) .ui-li-text-sub {
504 right : 16 * @unit_base;
505 top: 22 * @unit_base;
508 .ui-li-has-multiline .ui-li-text-sub {
513 left : 16 * @unit_base;
514 top: 70 * @unit_base;
518 .LESStext-ellipsis();
521 .ui-li-icon-sub-right,
525 width: @list-smallicon-size;
526 height: @list-smallicon-size;
529 .ui-li-icon-sub-right {
530 right : 16 * @unit_base;
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;
546 .LESSdialogue-border-style;
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;
556 &> li.ui-li-dialogue.ui-li-expanded {
557 padding-left : 44 * @unit_base;
558 min-height : 52 * @unit_base;
562 &> li.ui-li-dialogue.ui-li-divider {
563 height: 32 * @unit_base;
567 &> li.ui-li-group-title {
568 padding-top : 32 * @unit_base;
571 &> li.ui-li-group-title span {
572 padding-left : 16 * @unit_base;
574 &> li.ui-li-dialogue-divider {
575 .LESSdialogue-divider;
588 min-width: 160 * @unit_base;
589 min-height: 160 * @unit_base;
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;
598 font-size: @list-li-bubble-font-size;
600 //margin: 12px 20% 12px 0%;
601 margin-top: 12 * @unit_base;
602 margin-bottom: 12 * @unit_base;
607 padding: 16px 22px 16px 16px;
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;
619 height: 40 * @unit_base;
620 font-size: @list-li-bubble-date-font-size;
621 margin: 12px 0%; // no horizontal margin
624 text-align: @style_list_bubble_date_text_align;
626 span.ui-li-bubble-time {
628 font-size: @list-li-bubble-time-font-size;
629 display: inline-block;
633 // Expandable list animation
635 @-webkit-keyframes ui-expand-show {
637 -webkit-transform-origin: 0% 0%;
638 -webkit-transform: rotateX(90deg) skewX(30deg) translateZ(0);
640 -webkit-transform-origin: 0% 0%;
641 -webkit-transform: rotateX(0deg) skewX(0deg) translateZ(0);
647 .ui-li-expandable-shown {
649 .LESSimg-expanded-icon;
651 .ui-li-expandable-hidden {
653 .LESSimg-expand-icon;
658 .ui-li-expand-transition-show {
660 -webkit-animation: ui-expand-show 0.4s 1 ease-out;
662 .ui-li-expand-transition-hide {
664 height: 0px !important;
665 min-height: 0px !important;
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;
677 .LESSimg-expand-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) {
679 background-image: url(images/00_button_expand_closed.png);
680 background-size: 100%;
683 width: 64 * @unit_base;
684 height: 64 * @unit_base;
685 margin-top: -(@size/2);
686 right: 16 * @unit_base;
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%;
696 width: 64 * @unit_base;
697 height: 64 * @unit_base;
698 margin-top: -(@size/2);
699 right: 16 * @unit_base;