@import "../../globals.md"; @import "./input"; // Material Design Input // -------------------------------------------------- $text-input-md-background-color: $list-md-background-color !default; $text-input-md-highlight-color: color($colors-md, primary) !default; $text-input-md-hightlight-color-valid: color($colors-md, secondary) !default; $text-input-md-hightlight-color-invalid: color($colors-md, danger) !default; $text-input-md-margin-top: $item-md-padding-top !default; $text-input-md-margin-right: ($item-md-padding-right / 2) !default; $text-input-md-margin-bottom: $item-md-padding-bottom !default; $text-input-md-margin-left: ($item-md-padding-left / 2) !default; $text-input-md-input-clear-icon-width: 30px !default; $text-input-md-input-clear-icon-color: #5b5b5b !default; $text-input-md-input-clear-icon-svg: "" !default; $text-input-md-input-clear-icon-size: 22px !default; // Material Design Default Input // -------------------------------------------------- .text-input { margin: $text-input-md-margin-top $text-input-md-margin-right $text-input-md-margin-bottom $text-input-md-margin-left; padding: 0; width: calc(100% - #{$text-input-md-margin-right} - #{$text-input-md-margin-left}); } // Material Design Inset Input // -------------------------------------------------- .inset-input { margin: ($item-md-padding-top / 2) $item-md-padding-right ($item-md-padding-bottom / 2) $item-md-padding-left; padding: ($item-md-padding-top / 2) ($item-md-padding-right / 2) ($item-md-padding-bottom / 2) ($item-md-padding-left / 2); } // Material Design Highlighted Input // -------------------------------------------------- ion-input::after { position: absolute; right: 0; bottom: 0; left: $item-md-padding-left; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; content: ""; } .input-has-focus::after { border-bottom-color: $text-input-md-highlight-color; } ion-input.ng-valid.input-has-value::after { border-bottom-color: $text-input-md-hightlight-color-valid; } ion-input.ng-invalid.ng-touched::after { border-bottom-color: $text-input-md-hightlight-color-invalid; } // Material Design Stacked & Floating Inputs // -------------------------------------------------- .item-label-stacked .text-input, .item-label-floating .text-input { margin-top: 8px; margin-bottom: 8px; margin-left: 0; width: calc(100% - #{$text-input-md-margin-right}); } .item-label-stacked ion-select, .item-label-floating ion-select { padding-top: 8px; padding-bottom: 8px; padding-left: 0; } .item-label-floating .text-input.cloned-input { top: 32px; } .item-label-stacked .text-input.cloned-input { top: 27px; } // Material Design Clear Input Icon // -------------------------------------------------- ion-input[clearInput] { position: relative; .text-input { padding-right: $text-input-md-input-clear-icon-width; } } .text-input-clear-icon { @include svg-background-image($text-input-md-input-clear-icon-svg); right: ($item-md-padding-right / 2); bottom: 2px; width: $text-input-md-input-clear-icon-width; background-size: $text-input-md-input-clear-icon-size; }