OLD | NEW |
1 /* | 1 /* |
2 * @license | 2 * @license |
3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt | 4 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt |
5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt | 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt |
6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt | 6 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt |
7 * Code distributed by Google as part of the polymer project is also | 7 * Code distributed by Google as part of the polymer project is also |
8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt | 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt |
9 */ | 9 */ |
10 | 10 |
11 :host { | 11 :host { |
12 display: inline-block; | 12 display: inline-block; |
13 outline: none; | 13 outline: none; |
14 text-align: inherit; | 14 text-align: inherit; |
15 color: #757575; | |
16 padding: 0.75em 0; | 15 padding: 0.75em 0; |
17 } | 16 } |
18 | 17 |
19 :host /deep/ input, | 18 polyfill-next-selector { |
20 :host /deep/ textarea { | 19 content: '.input-body > :not(.label)'; |
| 20 } |
| 21 ::content > *, |
| 22 ::content > input[is="core-input"] { |
| 23 padding: 0; |
| 24 margin: 0.5em 0 0.25em; |
| 25 width: 100%; |
| 26 } |
| 27 |
| 28 polyfill-next-selector { |
| 29 content: 'input, textarea'; |
| 30 } |
| 31 ::content input, |
| 32 ::content input[is=core-input], |
| 33 ::content textarea { |
21 font: inherit; | 34 font: inherit; |
22 color: #000; | 35 color: inherit; |
23 padding: 0; | |
24 margin: 0; | |
25 background-color: transparent; | 36 background-color: transparent; |
26 border: none; | 37 border: none; |
27 outline: none; | 38 outline: none; |
28 /* see comments in template */ | |
29 width: 100%; | |
30 height: 100%; | |
31 } | 39 } |
32 | 40 |
33 input:invalid, | 41 polyfill-next-selector { |
34 textarea:invalid { | 42 content: ':invalid'; |
| 43 } |
| 44 ::content input:invalid, |
| 45 ::content textarea:invalid { |
35 box-shadow: none; | 46 box-shadow: none; |
36 } | 47 } |
37 | 48 |
38 textarea { | 49 polyfill-next-selector { |
| 50 content: 'textarea'; |
| 51 } |
| 52 ::content textarea { |
39 resize: none; | 53 resize: none; |
40 } | 54 } |
41 | 55 |
42 [invisible] { | 56 [invisible] { |
43 visibility: hidden; | 57 visibility: hidden; |
44 } | 58 } |
45 | 59 |
46 [animated] { | 60 [animated] { |
47 visibility: visible !important; | 61 visibility: visible !important; |
48 -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opaci
ty 0.2s cubic-bezier(0.4, 0, 0.2, 1); | 62 -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opaci
ty 0.2s cubic-bezier(0.4, 0, 0.2, 1); |
(...skipping 27 matching lines...) Expand all Loading... |
76 overflow: hidden; | 90 overflow: hidden; |
77 text-overflow: ellipsis; | 91 text-overflow: ellipsis; |
78 white-space: nowrap; | 92 white-space: nowrap; |
79 display: inline-block; | 93 display: inline-block; |
80 max-width: 100%; | 94 max-width: 100%; |
81 -moz-transform-origin: 0% 0%; | 95 -moz-transform-origin: 0% 0%; |
82 -webkit-transform-origin: 0% 0%; | 96 -webkit-transform-origin: 0% 0%; |
83 transform-origin: 0% 0%; | 97 transform-origin: 0% 0%; |
84 } | 98 } |
85 | 99 |
86 .cursor { | |
87 position: absolute; | |
88 top: 0.4em; | |
89 left: 0; | |
90 width: 1px; | |
91 height: 1.4em; | |
92 opacity: 0.4; | |
93 -moz-transform-origin: 0%; | |
94 -webkit-transform-origin: 0%; | |
95 transform-origin: 0%; | |
96 -webkit-transform: none; | |
97 transform: none; | |
98 } | |
99 | |
100 .cursor[invisible] { | |
101 opacity: 0.75; | |
102 -webkit-transform: translate3d(3em,0,0) scale3d(50,1,1); | |
103 transform: translate3d(3em,0,0) scale3d(50,1,1); | |
104 } | |
105 | |
106 .input-container { | |
107 position: absolute; | |
108 /* simulate padding so the input/textarea can use 100% width/height */ | |
109 top: 0.5em; | |
110 right: 0; | |
111 bottom: 0.25em; | |
112 left: 0; | |
113 } | |
114 | |
115 .underline { | 100 .underline { |
116 height: 0px; | 101 height: 0px; |
117 overflow: visible; | 102 overflow: visible; |
118 } | 103 } |
119 | 104 |
120 :host([disabled]) .underline { | 105 :host([disabled]) .underline { |
121 border-bottom: 1px dashed; | 106 border-bottom: 1px dashed #757575; |
122 } | 107 } |
123 | 108 |
124 .unfocused-underline { | 109 .unfocused-underline { |
125 height: 1px; | 110 height: 1px; |
126 background: #757575; | |
127 border-bottom-color: #757575; | |
128 } | 111 } |
129 | 112 |
130 .focused-underline { | 113 .focused-underline { |
131 height: 2px; | 114 height: 2px; |
132 -webkit-transform: none; | 115 -webkit-transform: none; |
133 transform: none; | 116 transform: none; |
134 } | 117 } |
135 | 118 |
136 .focused-underline[invisible] { | 119 .focused-underline[invisible] { |
137 -webkit-transform: scale3d(0,1,1); | 120 -webkit-transform: scale3d(0,1,1); |
138 transform: scale3d(0,1,1); | 121 transform: scale3d(0,1,1); |
139 } | 122 } |
140 | 123 |
141 .error-text { | 124 .error-text { |
142 font-size: 0.75em; | 125 font-size: 0.75em; |
143 padding: 0.5em 0; | 126 padding: 0.5em 0; |
144 } | 127 } |
145 | 128 |
146 .error-icon { | 129 .error-icon { |
147 height: 20px; | 130 height: 20px; |
148 width: 20px; | 131 width: 20px; |
149 } | 132 } |
OLD | NEW |