/** Styles for sgTimePane. */ $sg-time-pane-cell-size: 40px; $sg-time-width: (12 * $sg-time-pane-cell-size) + (2 * $md-calendar-side-padding); sg-time-pane { font-size: 13px; user-select: none; } .hours-pane { // TODO: should use background-200 border-bottom: solid 1px rgb(224,224,224); } .toggle-pane { // TODO: should use background-200 border-top: solid 1px rgb(224,224,224); } .hours-pane, .min1, .min5 { padding: 0 $md-calendar-side-padding; } .md-button.md-fab.hourBtn, .md-button.md-fab.minuteBtn, .md-button.md-fab.toggleBtn, .md-button.md-fab.hourBtn.md-focused, .md-button.md-fab.minuteBtn.md-focused, .md-button.md-fab.toggleBtn.md-focused, .md-button.md-fab.hourBtn.md-focus, .md-button.md-fab.minuteBtn.md-focus, .md-button.md-fab.toggleBtn.md-focus { min-width: 10px; min-height: 10px; border-color: transparent; font-weight:normal; color: rgba(0,0,0,0.5); height: $sg-time-pane-cell-size; width: $sg-time-pane-cell-size; line-height: $sg-time-pane-cell-size; box-shadow: none; margin: 0; &:not(.md-bg):not(.toggleBtn) { background-color: transparent; &:hover { background-color: lightgrey; color: #666666; } } } .md-button.md-fab.toggleBtn { color: white; margin: 5px; } sg-timepicker { // Don't let linebreaks happen between the open icon-button and the input. white-space: nowrap; } // The calendar icon button used to open the calendar pane. // Need absurd specificty to override md-button.md-icon-button. .sg-timepicker-button { display: inline-block; box-sizing: border-box; background: none; } // The input into which the user can type the time. .sg-timepicker-input { @extend .md-datepicker-input; } // Container for the timepicker input. .sg-timepicker-input-container { @extend .md-datepicker-input-container; &.sg-timepicker-focused { border-bottom-width: 2px; } // From datePicker-theme.scss // TODO: should use background-300 border-bottom-color: rgb(224,224,224); } // Floating pane that contains the time at the bottom of the input. .sg-timepicker-time-pane { @extend .md-datepicker-calendar-pane; // Because blocks of 1-minute cells are allowed to wrap on multiple rows, // we limit the maximum size of the time pane max-width: $sg-time-width; // From datePicker-theme.css border-color: rgb(224,224,224); } // Portion of the floating panel that sits, invisibly, on top of the input. .sg-timepicker-input-mask { height: 40px; position: relative; background: transparent; pointer-events: none; cursor: text; } .sg-timepicker-input-mask-opaque { @extend .md-datepicker-input-mask-opaque; } // The time portion of the floating pane (vs. the input mask). .sg-timepicker-time { opacity: 0; // Use a modified timing function (from swift-ease-out) so that the opacity part of the // animation doesn't come in as quickly so that the floating pane doesn't ever seem to // cover up the trigger input. transition: opacity $md-datepicker-open-animation-duration cubic-bezier(0.5, 0, 0.25, 1); .md-pane-open & { opacity: 1; } sg-time:focus { outline: none; } } // Down triangle/arrow indicating that the datepicker can be opened. // We can do this entirely with CSS without needing to load an icon. // See https://css-tricks.com/snippets/css/css-triangle/ //$md-date-arrow-size: 5px; .sg-timepicker-expand-triangle { @extend .md-datepicker-expand-triangle; } // Button containing the down "disclosure" triangle/arrow. .sg-timepicker-triangle-button { @extend .md-datepicker-triangle-button; // From datepicker-theme.scss &:hover .sg-timepicker-expand-triangle { border-top-color: rgba(0,0,0,0.54); } } .sg-timepicker-triangle-button.md-button.md-icon-button { @extend .md-datepicker-triangle-button.md-button.md-icon-button; } // Disabled state for all elements of the picker. sg-timepicker[disabled] { .sg-timepicker-input-container { border-bottom-color: transparent; } .sg-timepicker-triangle-button { display: none; } } // Open state for all of the elements of the picker. .sg-timepicker-open { .sg-timepicker-input-container { margin-left: -$md-datepicker-button-gap; border: none; } .sg-timepicker-input { margin-left: 24px; height: 40px; } .sg-timepicker-triangle-button { display: none; } }