@import "_extends.scss"; /* spinner control for time, number (usable for date, datetime-local) */ .has-input-buttons, html > body input.ws-inputreplace.has-input-buttons, span.has-input-buttons { display: inline-block; } .input-buttons, .step-controls, .ws-popover-opener { zoom: 1; overflow: hidden; display: inline-block; font-size: 0; vertical-align: middle; margin-top: -3px; margin-left: -20px; } .step-controls, .ws-popover-opener { position: relative; float: left; margin: 0; height: 19px; width: 15px; } .ws-popover-opener { position: relative; zoom: 1; overflow: visible; margin: 0 0 0 2px; width: 19px; border-radius: 3px; cursor: pointer; background: #ccc; span { display: block; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; background: url(forms.png) no-repeat -321px -1px; .color-input-buttons & { background-position: -348px 0; } .time-input-buttons & { background-position: -377px 1px; } &.ws-color-indicator-bg { background: url(../jpicker/images/preview-opacity.png) no-repeat 0; } &.ws-color-indicator { background: none; } } } input[type="color"] { width: 6.5em; } .input-buttons { text-align: left; &.color-input-buttons { margin-left: 2px; } &.input-button-size-1 { &.month-input-buttons, &.date-input-buttons { margin-left: -24px; } } &.input-button-size-2 { margin-left: -39px; } &.ws-disabled { opacity: 0.95; } &.ws-disabled *, &.ws-readonly * { cursor: default; } } .step-controls { span { position: absolute; display: inline-block; overflow: hidden; margin: 0 !important; padding: 0 !important; width: 15px; height: 9px; cursor: pointer; font-size: 0; line-height: 0; background: url(forms.png) no-repeat 0 0; &.step-up { top: 0; background-position: -80px 0; &:hover { background-position: -105px 0; } &.mousepress-ui { background-position: -105px -20px; } .ws-disabled & { background-position: -130px 0; } } &.step-down { bottom: 0; background-position: -155px 0; &:hover { background-position: -180px 0; } &.mousepress-ui { background-position: -180px -20px; } .ws-disabled & { background-position: -205px 0; } } } } .ws-input { letter-spacing: -0.31em; word-spacing: -0.43em; > * { text-align: center; letter-spacing: normal; word-spacing: normal; } .ws-input-seperator { vertical-align: middle; width: 2%; overflow: hidden; } & + .input-buttons { margin-left: 2px; } input, .ws-input-seperator { -moz-box-sizing: border-box; box-sizing: border-box; text-align: center; display: inline-block; } } .ws-date { .mm, .dd { width: 23.5%; min-width: 12%; } .yy { width: 48%; min-width: 24%; } &.ws-month-select { .dd { width: 22%; min-width: 11%; } .mm { width: 38%; min-width: 19%; } .yy { width: 36%; min-width: 18%; } } } .ws-month { .mm, .yy { width: 47.9%; min-width: 24%; } } /* range */ .ws-range { position: relative; display: inline-block; vertical-align: middle; margin: 5px 0 10px; zoom: 1; border: none; height: em(8); width: 155px; border-radius: em(5); background: #ddd; cursor: pointer; font-size: 13px; outline: none; transition: background-color 400ms, border-color 400ms; background-color: #ddd; box-shadow: 0 em(-1) em(1.5) rgba(0, 0, 0, 0.2) inset; .ws-range-thumb { $dim: 16; top: 0; position: absolute; display: block; z-index: 4; margin: em($dim / -2) 0 0 em($dim / -2); height: em($dim); width: em($dim); border-radius: 50%; background: #ccc; border: em(1) solid #aaa; cursor: pointer; transition: background-color 400ms, border-color 400ms; &:after, &:before { position: absolute; top: em(-28); left: -.3em; display: inline-block; content: attr(data-value); padding: em(3) em(1); min-width: 2em; visibility: hidden; text-align: center; background: #fff; border: em(1) solid #ccc; transition: all 400ms; } &:after { content: attr(data-value); } &:before { content: attr(data-valuetext); } } &.ws-focus .ws-range-thumb { background: #eee; border-color: #999; } &.ws-active .ws-range-thumb { box-shadow: 0 0 em(9) rgba(0, 75, 100, 0.2); } &[aria-disabled="true"], &[aria-readonly="true"] { cursor: default; opacity: 0.95; } &[aria-disabled="true"] .ws-range-thumb, &[aria-readonly="true"] .ws-range-thumb { cursor: default; } &[aria-disabled="true"] .ws-range-thumb { background: #ddd; border-color: #ddd; } .ws-range-rail { position: absolute; display: block; top: 0; left: 0; right: 0; bottom: 0; margin: 0; zoom: 1; } .ws-range-progress { position: absolute !important; display: block; margin: 0; padding: 0 !important; top: 0; border-radius: em(5); height: 100%; left: 0; z-index: 1; overflow: hidden; background: #09c; box-shadow: 0 em(1.5) em(3.5) rgba(255, 255, 255, 0.2) inset; } .ws-range-ticks { position: absolute; bottom: em(-7.5); left: 0; height: em(6.8); width: em(1.5); margin: 0 0 0 em(-2); background: #ccc; } .ws-range-ticks[data-label]:after { visibility: hidden; content: attr(data-label); display: inline-block; font-size: em(9); min-width: 2em; text-align: center; margin: em(7) 0 0 -1em; } &.vertical-range { background: url(vertical-range.png) center bottom no-repeat; width: 20px; .ws-range-thumb { top: 0; left: 3px; bottom: auto; background: url(vertical-range.png) 0 -51px no-repeat; margin: -6px 0 0 0; height: 11px; width: 22px; } .ws-range-thumb:hover, &.ws-focus .ws-range-thumb { background-position: 0 -34px; } &.ws-active .ws-range-thumb { background-position: 0 -17px; } &[aria-disabled="true"] .ws-range-thumb { background-position: 0 0; } .ws-range-progress { top: auto; bottom: 1px; left: 0; width: 1px; height: 0; } .ws-range-rail { top: 5px; left: 0; right: 0; bottom: 5px; } .ws-range-ticks { bottom: auto; left: auto; right: 0; height: 1px; width: 4px; } } } //date popover $border-light: 1px solid #ddd; $button-bgcolor: #f5f5f5; %ws-button { border-radius: em(4); background: #ccc; padding: em(5) em(8); display: inline-block; border: em(1) solid transparent; } .input-picker { overflow: visible; font-size: 13px; outline: none; text-align: center; font-family: sans-serif; width: em(330); max-width: 100%; min-width: em(300); .ws-po-outerbox { -webkit-transform: translate(0, 30%); transform: translate(0, 30%); [data-vertical="bottom"] & { -webkit-transform: translate(0, -3%); transform: translate(0, -30%); } } &.time-popover, &.datetime-local-popover { width: em(415); } &.time-popover { .ws-prev, .ws-next, .ws-super-prev, .ws-super-next { display: none; } } &.ws-size-2 { width: em(645); } &.ws-size-3 { width: em(960); } &.color-popover { width: 590px; } abbr[title] { cursor: help; } li, button { font-size: em(13); line-height: em(16); color: #000; transition: all 400ms; } .ws-focus, :focus { outline: 1px dotted #000; } .ws-po-box { position: relative; padding: em(10) em(20) em(15); border-radius: 5px; box-shadow: 0 0 2px rgba(0, 0, 0, .3); } .ws-picker-controls { position: absolute; top: em(10); > button{ border: em(1) solid #ccc; border-radius: em(5); padding: 0; width: em(24); height: em(24); background: #eee; z-index: 1; color: #333; &.ws-year-btn:after, &:before { display: inline-block; content: " "; width: 0px; height: 0px; border-style: solid; } span { display: none; } &:hover { border-color: #666; color: #000; } &[disabled]{ opacity: 0.4; border-color: #eee; color: #ddd; } } } .prev-controls { left: em(20); .ws-super-prev:after, .ws-super-prev:before, .ws-prev:before { border-width: 0.35em 0.6em 0.35em 0; border-color: transparent #333 transparent transparent; margin-left: -0.1em; } .ws-super-prev { margin-right: em(3); &[disabled] { display: none; } } } .next-controls { right: em(20); button:before { margin-left: em(1.5); } .ws-super-next:before, .ws-super-next:after, .ws-next:before { border-width: 0.35em 0 0.35em 0.6em; border-color: transparent transparent transparent #333; margin-right: -0.1em; } .ws-super-next { margin-left: em(3); &[disabled] { display: none; } } } &.time-popover .ws-picker-body { padding-top: em(36); } .ws-picker-body { @extend %clearfix; position: relative; padding: em(40) 0 0; zoom: 1; margin: 0 em(-10); } .ws-button-row { @extend %clearfix; position: relative; margin: em(10) 0 0; border-top: em(1) solid #eee; padding: em(10) 0 0; text-align: left; z-index: 2; button { @extend %ws-button; border: em(1) solid #ccc; border-radius: 5px; box-shadow: 1px 1px 0 #fff; background-color: #ddd; background-image: -webkit-linear-gradient(top, #ececec 0%, #ddd 100%); background-image: linear-gradient(to bottom, #ececec 0%, #ddd 100%); transition: border-color 200ms linear; float: left; &.ws-empty { float: right; } } } &[data-currentview="setMonthList"] .ws-picker-header > select, &[data-currentview="setYearList"] .ws-picker-header > select{ max-width: 90%; } &[data-currentview="setDayList"] .ws-picker-header > select { max-width: 40%; } &[data-currentview="setDayList"] .ws-picker-header > .month-select { max-width: 50%; } &.time-popover .ws-picker-header { top: em(-30); button { font-size: em(15); } } .ws-picker-header { position: absolute; top: em(-40); right: 0; left: 0; margin: 0 em(55); > button { display: inline-block; width: 100%; margin: 0; padding: em(4) 0; font-weight: 700; color: #000; > .month-digit, > .monthname-short { display: none; } &:after { content: " "; margin: -0.1em 0.5em 0; width: 0px; height: 0px; border-style: solid; border-width: 0 0.3em 0.6em 0.3em; border-color: transparent transparent #333 transparent; vertical-align: middle; } &:hover { text-decoration: underline; } &[disabled]:after { display: none !important; } &[disabled]:hover { text-decoration: none; } } } .picker-grid { @extend %clearfix; position: relative; zoom: 1; overflow: hidden; .monthname, .month-digit { display: none; } } &.ws-size-1 .picker-list { float: none; width: auto; } .picker-list { @extend %clearfix; position: relative; zoom: 1; width: em(290); float: left; margin: 0 10px; background: #fff; tr { border: 0; } th, td { padding: em(3) em(5); text-align: center; } &.day-list td { padding: em(0.5) em(2); > button { padding: em(5.5) 0; } } &.time-list { > .ws-picker-header > button > .monthname { display: inline; } td { padding: em(1) em(5); > button { padding: em(6.85) 0; } } } td > button { display: block; padding: em(20.669) 0; width: 100%; border-radius: em(5); color: #000; background-color: #fff; &.othermonth { color: #888; } &:hover, &.checked-value { color: #fff; background: #000; } &[disabled], &[disabled]:hover { color: #888; background-color: #fff; } } table { width: 100%; margin: 0; border: 0 none; border-collapse: collapse; } th, td.week-cell { font-size: em(13); line-height: em(16); padding-bottom: em(3); text-transform: uppercase; font-weight: 700; } } .ws-options { margin: em(10) 0 0; border-top: em(1) solid #eee; padding: em(10) 0 0; text-align: left; h5 { margin: 0 0 em(5); padding: 0; font-size: em(14); font-weight: bold; } ul, li { padding: 0; margin: 0; list-style: none; } button { @extend %clearfix; display: block; padding: em(4); width: 100%; text-align: left; border-radius: em(4); &.ws-focus, &:focus, &:hover { color: #fff; background: #000; } &[disabled], &[disabled].ws-focus, &[disabled]:focus, &[disabled]:hover { color: #888; background: #fff; text-decoration: none; } .ws-value { float: left; } .ws-label { float: right; font-size: 96%; } } } /* Selector API: */ .ws-week, .ws-year-btn { display: none; } } .ws-picker-controls > button { display: inline-block; } .ws-picker-header > button:after { display: none; } .ws-picker-header select { display: none; }