|
18 | 18 | :host { |
19 | 19 | display: block; |
20 | 20 | } |
| 21 | + input { |
| 22 | + position: relative; /* to make a stacking context */ |
| 23 | + outline: none; |
| 24 | + box-shadow: none; |
| 25 | + margin: 0; |
| 26 | + padding: 0; |
| 27 | + width: 100%; |
| 28 | + max-width: 100%; |
| 29 | + background: transparent; |
| 30 | + border: none; |
| 31 | + color: var(--paper-input-container-input-color, var(--primary-text-color)); |
| 32 | + -webkit-appearance: none; |
| 33 | + text-align: inherit; |
| 34 | + vertical-align: bottom; |
| 35 | + |
| 36 | + /* Firefox sets a min-width on the input, which can cause layout issues */ |
| 37 | + min-width: 0; |
| 38 | + |
| 39 | + @apply --paper-font-subhead; |
| 40 | + @apply --paper-input-container-input; |
| 41 | + } |
| 42 | + |
| 43 | + input:disabled { |
| 44 | + @apply --paper-input-container-input-disabled; |
| 45 | + } |
| 46 | + |
| 47 | + input::-webkit-outer-spin-button, |
| 48 | + input::-webkit-inner-spin-button { |
| 49 | + @apply --paper-input-container-input-webkit-spinner; |
| 50 | + } |
| 51 | + |
| 52 | + input::-webkit-clear-button { |
| 53 | + @apply --paper-input-container-input-webkit-clear; |
| 54 | + } |
| 55 | + |
| 56 | + input::-webkit-calendar-picker-indicator { |
| 57 | + @apply --paper-input-container-input-webkit-calendar-picker-indicator; |
| 58 | + } |
| 59 | + |
| 60 | + input::-webkit-input-placeholder { |
| 61 | + color: var(--paper-input-container-color, var(--secondary-text-color)); |
| 62 | + } |
| 63 | + |
| 64 | + input:-moz-placeholder { |
| 65 | + color: var(--paper-input-container-color, var(--secondary-text-color)); |
| 66 | + } |
| 67 | + |
| 68 | + input::-moz-placeholder { |
| 69 | + color: var(--paper-input-container-color, var(--secondary-text-color)); |
| 70 | + } |
| 71 | + |
| 72 | + input::-ms-clear { |
| 73 | + @apply --paper-input-container-ms-clear; |
| 74 | + } |
| 75 | + |
| 76 | + input::-ms-reveal { |
| 77 | + @apply --paper-input-container-ms-reveal; |
| 78 | + } |
| 79 | + |
| 80 | + input:-ms-input-placeholder { |
| 81 | + color: var(--paper-input-container-color, var(--secondary-text-color)); |
| 82 | + } |
21 | 83 | </style> |
22 | 84 |
|
23 | 85 | <paper-input-container id="container" |
24 | 86 | disabled$="[[disabled]]" |
25 | 87 | always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" |
26 | 88 | invalid="[[invalid]]"> |
27 | 89 |
|
28 | | - <label hidden$="[[!label]]">[[label]]</label> |
| 90 | + <label hidden$="[[!label]]" slot="label">[[label]]</label> |
29 | 91 |
|
30 | | - <input is="iron-input" id="input" |
31 | | - aria-labelledby$="[[_ariaLabelledBy]]" |
32 | | - aria-describedby$="[[_ariaDescribedBy]]" |
33 | | - disabled$="[[disabled]]" |
34 | | - bind-value="{{value}}" |
35 | | - required$="[[required]]" |
36 | | - name$="[[name]]" |
37 | | - prevent-invalid-input |
38 | | - invalid="{{invalid}}" |
39 | | - autofocus$="[[autofocus]]" |
40 | | - inputmode$="[[inputmode]]" |
| 92 | + <iron-input bind-value="{{value}}" slot="input" |
| 93 | + id="input" |
41 | 94 | maxlength$="[[maxlength]]" |
42 | 95 | allowed-pattern="[0-9\/]" |
43 | | - placeholder$="[[placeholder]]"> |
| 96 | + invalid="{{invalid}}"> |
| 97 | + <input aria-labelledby$="[[_ariaLabelledBy]]" |
| 98 | + aria-describedby$="[[_ariaDescribedBy]]" |
| 99 | + disabled$="[[disabled]]" |
| 100 | + bind-value="{{value}}" |
| 101 | + required$="[[required]]" |
| 102 | + name$="[[name]]" |
| 103 | + prevent-invalid-input |
| 104 | + autofocus$="[[autofocus]]" |
| 105 | + inputmode$="[[inputmode]]" |
| 106 | + placeholder$="[[placeholder]]"> |
| 107 | + </iron-input> |
44 | 108 |
|
45 | 109 | <template is="dom-if" if="[[errorMessage]]"> |
46 | | - <paper-input-error id="error">[[errorMessage]]</paper-input-error> |
| 110 | + <paper-input-error id="error" slot="error">[[errorMessage]]</paper-input-error> |
47 | 111 | </template> |
48 | 112 |
|
49 | 113 | </paper-input-container> |
|
0 commit comments