/* * jQuery Mobile Framework * Copyright (c) jQuery Project * Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses. */ /*** less definitions ***/ @import "config.less"; /* Using font size */ @list-font-size-main: 44 * @unit_base; @list-font-size-sub: 32 * @unit_base; @list-font-size-divider: 32 * @unit_base; // NOTE: defined in dialogue group /* @list-dialogue-font-size-main: 38 * @unit_base; @list-dialogue-font-size-sub: 32 * @unit_base; */ @list-font-weight: normal; /* @list-li-height: 112 * @unit_base; @list-li-2line-height: 128 * @unit_base; @list-li-3line-height: 160 * @unit_base; @list-li-top-padding: 10 * @unit_base; @list-li-main-line-height: 60 * @unit_base; @list-li-sub-line-height: 48 * @unit_base; */ @list-smallicon-size: 32 * @unit_base; @list-li-padding-horizontal: 16 * @unit_base; /* @list-li-divider-height: 32 * @unit_base; */ @list-bigicon-size: 64 * @unit_base; @list-bigicon-size2: 72 * @unit_base; /* @list-checkbox-size: 42 * @unit_base; @list-progressbar-height: 16 * @unit_base; */ // Bubble @list-li-bubble-font-size: 38 * @unit_base; @list-li-bubble-time-font-size: 26 * @unit_base; @list-li-bubble-date-font-size: @list-li-bubble-time-font-size; @list-li-bubble-corner-radius: 9 * @unit_base; // TODO: fit to 9px (picked from bg images) @list-li-sub-left-width: 187 * @unit_base; @list-li-main-right-padding: 187 * @unit_base; //Email @list-li-email-top-padding: 8 * @unit_base; @list-li-email-subline-top-padding: 4 * @unit_base; @list-li-email-sub-line-height: 40 * @unit_base; @list-email-icon-width: 56 * @unit_base; @list-email-icon-height: 60 * @unit_base; @list-email-icon-top-padding: 16 * @unit_base; @list-email-attach-icon-width: 40 * @unit_base; @list-email-attach-icon-height: 40 * @unit_base; @list-email-warning-icon-width: 30 * @unit_base; @list-email-warning-icon-height: 30 * @unit_base; @list-email-text-padding-left: 60 * @unit_base; /************************/ .ui-listview { margin: 0; counter-reset: listnumbering; border-top-width: 1px; border-top-style: solid; li.ui-btn > .ui-btn-hastxt > .ui-btn-text.ui-btn-text-padding-right { padding-right: 0 * @unit_base; // Clear default button padding-right } &> .ui-li { // list item separator line border-bottom-width: 1px; border-bottom-style: solid; border-top-width: 0px; } &> .ui-li:not(.ui-li-divider) { &:not(.ui-li-static) { min-height : 112 * @unit_base; } } &> .ui-li.ui-li-has-multiline:not(.ui-li-divider) { &:not(.ui-li-static) { min-height : 128 * @unit_base; } } } .ui-content { .ui-listview { margin-left: -16 * @unit_base; margin-right: -16 * @unit_base; padding-bottom: 1px; .ui-listview { margin: 0; } } .ui-listview-inset { margin: 1em 0; } } .ui-listview, .ui-li { list-style:none; padding:0; font-size : @list-font-size-main; } .ui-li, .ui-li.ui-field-contain { display: block; margin:0; position: relative; overflow: visible; text-align: left; } .ui-li { h3 { margin-top : 0px; margin-bottom : 0px; font-size : @list-font-size-main; min-height : 52 * @unit_base; font-weight : normal; } form { display : inline-block; } .ui-btn { top: 50%; margin-top: -0.8em; } .ui-btn-text { position: relative; a.ui-link-inherit { .LESStext-ellipsis(); } } &:last-child, &.ui-field-contain:last-child { border-bottom-width: 1px; } &>.ui-btn-inner { display: block; position: relative; padding: 0; border-width:0; } &>.ui-btn-inner.ui-btn-hastxt { padding: 0px 0px; } .ui-btn-inner a.ui-link-inherit, &.ui-li-static { padding-top : 30 * @unit_base; padding-bottom : 30 * @unit_base; padding-left : 16 * @unit_base; padding-right : 16 * @unit_base; display: block; white-space: normal; // default: 1line } .ui-btn-inner a.ui-link-inherit { .LESStext-no-ellipsis(); } .ui-toggleswitch { &:last-child { top : 50%; margin-top : -40 * @unit_base; display : inline-block; position : absolute; right : 16 * @unit_base; } } [data-role="button"] { &:last-child { position : absolute; right : 16 * @unit_base; } } .ui-radio, .ui-checkbox { &:first-child{ position : absolute; top : 50%; margin-top : -30 * @unit_base; left : 16 * @unit_base; width : 60 * @unit_base; height : 60 * @unit_base; .ui-btn-inner { padding : 10 * @unit_base 10 * @unit_base 10 * @unit_base 10 * @unit_base; line-height : 40 * @unit_base; color : transparent; .ui-icon { left : 5 * @unit_base; } } } } img.ui-li-bigicon { position : absolute; top : 50%; margin-top : -36 * @unit_base; &:first-child { left : 16 * @unit_base; } &:nth-child(2) { left : 92 * @unit_base; } &:last-child { right : 16 * @unit_base; } } .ui-li-color-bar + img.ui-li-bigicon:nth-child(2) { left : 16 * @unit_base; } .ui-li-color-bar { position : absolute; width : 12 * @unit_base; height : 20 * @unit_base; top : 0 * @unit_base; left : 0 * @unit_base; background-color : rgba(0, 0, 0, 1); } } li.ui-li-thumbnail-right { img.ui-li-bigicon.ui-li-thumb { left : auto; right : 16 * @unit_base; } } .ui-li.ui-li-has-multiline { .ui-btn-inner a.ui-link-inherit, &.ui-li-static { padding-top : 10 * @unit_base; padding-bottom : 58 * @unit_base; min-height : 60 * @unit_base; } a { .LESStext-no-ellipsis(); padding-right : 16 * @unit_base; /* ellipsis for normal text */ } } /********************************************/ /************ Add ellipsis *****************/ /********************************************/ .ui-li.ui-li-text-ellipsis { .ui-btn-inner a.ui-link-inherit { .LESStext-ellipsis(); } a { .LESStext-ellipsis(); } &.ui-li-static { .LESStext-ellipsis(); } } /********************************************/ /*************** Divider ********************/ /********************************************/ .ui-li-divider { cursor: default; counter-reset: listnumbering; font-weight: bold; font-size: @list-font-size-divider; padding-left: 16 * @unit_base; padding-top: 8 * @unit_base; padding-bottom: 8 * @unit_base; } .ui-listview .ui-li-divider { &[data-style="dialogue"] { height: 32 * @unit_base; padding : 0px; .LESSdialogue-divider; background : @color_bg; } &[data-style="check"] { height: 60 * @unit_base; padding-top : 0px; padding-bottom : 0px; padding-left : 92 * @unit_base; line-height : 60 * @unit_base; } &[data-style="checkexpandable"] { height: 60 * @unit_base; padding-top : 0px; padding-bottom : 0px; padding-left : 92 * @unit_base; line-height : 60 * @unit_base; } &[data-style="expandable"] { height: 60 * @unit_base; padding-top : 0px; padding-bottom : 0px; line-height : 60 * @unit_base; } } .ui-divider-expand-div { position : absolute; width : 98 * @unit_base; height : 42 * @unit_base; top : 10 * @unit_base; right : 0px; border-left-width : 1px; border-left-style : solid; border-left-color : @color_list_divider_expand_div; } .ui-li-has-thumb:not(.ui-li-thumbnail-right) { .ui-btn-inner a.ui-link-inherit, &.ui-li-static { min-height: 60 * @unit_base; padding-left: 104 * @unit_base; } .ui-li-text-sub { padding-left: 104 * @unit_base; padding-right: 16 * @unit_base; /* ellipsis for sub text */ } } .ui-li-has-checkbox, .ui-li-has-radio{ .ui-btn-inner a.ui-link-inherit, &.ui-li-static { min-height: 60 * @unit_base; padding-left: 92 * @unit_base; } .ui-li-text-sub { padding-left: 92 * @unit_base; } } .ui-li-has-thumb.ui-li-has-checkbox, .ui-li-has-thumb.ui-li-has-radio { .ui-btn-inner a.ui-link-inherit, &.ui-li-static { min-height: 60 * @unit_base; padding-left: 180 * @unit_base; } .ui-li-text-sub { padding-left: 180 * @unit_base; } } .ui-li.ui-li-has-right-circle-btn { .ui-btn-inner a { padding-right : 96 * @unit_base; } } .ui-li.ui-li-has-right-btn { .ui-btn-inner a { padding-right : 158 * @unit_base; } } .ui-li.ui-li-thumbnail-right { .ui-btn-inner a { padding-right : 104 * @unit_base; } } .ui-li.ui-li-static.ui-li-has-right-circle-btn { padding-right : 96 * @unit_base; } .ui-li.ui-li-static.ui-li-has-right-btn { padding-right : 158 * @unit_base; } .ui-li.ui-li-static.ui-li-thumbnail-right { padding-right : 104 * @unit_base; } .ui-li-has-icon { .ui-btn-inner a.ui-link-inherit, &.ui-li-static { min-height: 20px; padding-left: 40px; } .ui-li-text-sub { padding-left: 40px; } } .ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; .LESStext-ellipsis(); } .ui-li-thumb, .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: @list-bigicon-size2; max-width: @list-bigicon-size2; } .ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner { border-top: 0px; } .ui-li-sub, .ui-li-sub-setting { float: right; text-align: right; font-size: @font_size_list_sub_text; margin: .3em 0; } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* ~~~~~~~~~~~~~~ NEW LIST STYLE ~~~~~~~~~ */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .ui-li-text-sub { float: right; text-align: right; font-size: @font_size_list_sub_text; color: @color_list_sub_text_default; position : absolute; right : 16 * @unit_base; top : 16 * @unit_base; width : 95%; .LESStext-ellipsis(); > img { position : relative; width: @list-smallicon-size; height: @list-smallicon-size; margin: 0 @list-li-padding-horizontal 0 @list-li-padding-horizontal; } } .ui-li-text-sub2 { float: right; text-align: right; font-size: @font_size_list_sub_text; color: @color_list_sub_text_default; position : absolute; right : 16 * @unit_base; top : 16 * @unit_base; width : 60%; .LESStext-ellipsis(); > img { width: @list-smallicon-size; height: @list-smallicon-size; margin: 0 0 0 @list-li-padding-horizontal; } } /* li:not(.ui-li-has-multiline) .ui-li-text-sub { position : absolute; right : 16 * @unit_base; top: 22 * @unit_base; margin-top: 0px; }*/ .ui-li-has-multiline .ui-li-text-sub { position : absolute; text-align: left; right : auto; left : 16 * @unit_base; top: 70 * @unit_base; margin-top: 0px; width : 90%; .LESStext-ellipsis(); } .ui-li-has-multiline.ui-li-has-right-btn { .ui-btn-inner a { .ui-li-text-sub { width : 74%; } } } .ui-li-has-multiline.ui-li-static.ui-li-has-right-btn { .ui-li-text-sub { width : 74%; } } .ui-li-icon-sub-right, .ui-li-icon-sub { position: absolute; left: auto; width: @list-smallicon-size; height: @list-smallicon-size; margin: 0 0; } .ui-li-icon-sub-right { right : 16 * @unit_base; } // ========= // Dialogue // ========= .ui-listview { &> li.ui-li-dialogue { margin-left: @style_list_li_dialogue_margin_left; margin-right : @style_list_li_dialogue_margin_left; border-left: @style_list_li_dialogue_border_left_width @color_dialogue_editor_border solid; //margin-left: @style_list_li_dialogue_margin_left; border-top-width: 0px; .LESSdialogue-border-style; } &> li.ui-li-dialogue.ui-body-s, &> li.ui-li-dialogue.ui-btn-hover-up-s:not(.ui-btn-down-s), &> li.ui-li-dialogue.ui-btn-up-s { &:not(.ui-li-expanded){ background : @color_list_dialogue_bg; } } &> li.ui-li-dialogue.ui-li-expanded { padding-left : 44 * @unit_base; min-height : 52 * @unit_base; } &> li.ui-li-dialogue.ui-li-divider { height: 32 * @unit_base; padding : 0px; } &> li.ui-li-group-title { padding-top : 32 * @unit_base; } &> li.ui-li-group-title span { padding-left : 16 * @unit_base; } &> li.ui-li-dialogue-divider { .LESSdialogue-divider; } } // ========= // bubble li // ========= .ui-listview { .ui-li-bubble-left, .ui-li-bubble-right, .ui-li-bubble-sos { img { position: relative; min-width: 160 * @unit_base; min-height: 160 * @unit_base; } } .ui-li-bubble-left { word-wrap: break-word; .LESSborder-radius-topright(@list-li-bubble-corner-radius); .LESSborder-radius-bottomright(@list-li-bubble-corner-radius); font-size: @list-li-bubble-font-size; p, span { font-size: @list-li-bubble-font-size; } //margin: 12px 20% 12px 0%; margin-top: 12 * @unit_base; margin-bottom: 12 * @unit_base; margin-left: 0; margin-right: auto; max-width: 80%; min-width: 30%; padding: 16px 22px 16px 16px; } .ui-li-bubble-right { word-wrap: break-word; .LESSborder-radius-topleft(@list-li-bubble-corner-radius); .LESSborder-radius-bottomleft(@list-li-bubble-corner-radius); margin: 12px 0% 12px 20%; padding: 16px 16px 16px 22px; } .ui-li-bubble-sos { } .ui-li-bubble-date { height: 40 * @unit_base; font-size: @list-li-bubble-date-font-size; margin: 12px 0%; // no horizontal margin padding: 0% 16px; padding-top: 15px; text-align: @style_list_bubble_date_text_align; } span.ui-li-bubble-time { margin-left: 12px; font-size: @list-li-bubble-time-font-size; display: inline-block; } } // Expandable list animation @-webkit-keyframes ui-expand-show { from { -webkit-transform-origin: 0% 0%; -webkit-transform: rotateX(90deg) skewX(30deg) translateZ(0); } to { -webkit-transform-origin: 0% 0%; -webkit-transform: rotateX(0deg) skewX(0deg) translateZ(0); } } .ui-listview { .ui-li-expandable { } .ui-li-expandable-shown { // Down arrow .LESSimg-expanded-icon; } .ui-li-expandable-hidden { // Right arrow .LESSimg-expand-icon; } .ui-li-expanded { overflow-x: hidden; } .ui-li-expand-transition-show { visibility: visible; -webkit-animation: ui-expand-show 0.4s 1 ease-out; } .ui-li-expand-transition-hide { visibility: hidden; height: 0px !important; min-height: 0px !important; padding-top: 0px; padding-bottom: 0px; border: 0px; -webkit-transition: all 0.2s ease; -moz-transition: all 0.2s ease; -o-transition: all 0.2s ease; -ms-transition: all 0.2s ease; transition: all 0.2s ease; } } .LESSimg-expand-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) { .ui-li-expand-icon { background-image: url(images/00_list_expand_closed.png); background-size: 100%; position: absolute; top: 50%; width: 64 * @unit_base; height: 64 * @unit_base; margin-top: -(@size/2); right: 16 * @unit_base; } } .LESSimg-expanded-icon(@right:@list-li-padding-horizontal, @size:@list-bigicon-size) { .ui-li-expanded-icon { background-image: url(images/00_list_expand_opened.png); background-size: 100%; position: absolute; top: 50%; width: 64 * @unit_base; height: 64 * @unit_base; margin-top: -(@size/2); right: 16 * @unit_base; } }