Delete chrome.mediaGalleriesPrivate because the functionality unique to it has since...
[chromium-blink-merge.git] / third_party / polymer / components / paper-input / demo.html
blob21bae3198ca0d02a9e9810c019e7b910efb05044
1 <!--
2 @license
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://polymer.github.io/LICENSE.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/CONTRIBUTORS.txt
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/PATENTS.txt
9 -->
10 <!doctype html>
11 <html>
12 <head>
14 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
16 <title>paper-input</title>
18 <script src="../webcomponentsjs/webcomponents.js"></script>
20 <link href="../font-roboto/roboto.html" rel="import">
21 <link href="paper-autogrow-textarea.html" rel="import">
22 <link href="paper-input-decorator.html" rel="import">
23 <link href="paper-input.html" rel="import">
25 <style shim-shadowdom>
27 body {
28 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
29 font-size: 14px;
30 margin: 0;
31 padding: 24px;
32 -webkit-tap-highlight-color: rgba(0,0,0,0);
33 -webkit-touch-callout: none;
36 section {
37 padding: 20px 0;
40 section > div {
41 padding: 14px;
42 font-size: 16px;
45 paper-input {
46 width: 80%;
49 paper-input-decorator {
50 max-width: 80%;
53 paper-input.narrow {
54 width: 150px;
57 .custom /deep/ ::-webkit-input-placeholder {
58 color: #f4b400;
61 .custom /deep/ ::-moz-placeholder {
62 color: #f4b400;
65 .custom /deep/ :-ms-input-placeholder {
66 color: #f4b400;
69 .custom /deep/ .label-text,
70 .custom /deep/ .error {
71 color: #f4b400;
74 .custom /deep/ .unfocused-underline {
75 background-color: #f4b400;
78 .custom[focused] /deep/ .floated-label .label-text {
79 color: #0f9d58;
82 .custom /deep/ .focused-underline {
83 background-color: #0f9d58;
86 .custom.invalid /deep/ .floated-label .label-text,
87 .custom /deep/ .error {
88 color: #f06292;
91 .custom.invalid /deep/ .focused-underline {
92 background-color: #f06292;
95 .custom {
96 color: #1a237e;
99 </style>
101 </head>
102 <body unresolved>
104 <section>
106 <div>Standalone</div>
108 <br>
110 <paper-input label="label"></paper-input>
112 <br>
114 <paper-input label="floating label" floatingLabel></paper-input>
116 </section>
118 <section>
120 <div>Decorator</div>
122 <br>
124 <paper-input-decorator label="with core-input">
125 <input is="core-input">
126 </paper-input-decorator>
128 <br>
130 <paper-input-decorator label="with core-input + floatingLabel" floatingLabel>
131 <input is="core-input">
132 </paper-input-decorator>
134 <br>
136 <paper-input-decorator label="with autogrowing text area">
137 <paper-autogrow-textarea>
138 <textarea></textarea>
139 </paper-autogrow-textarea>
140 </paper-input-decorator>
142 <br>
144 <paper-input-decorator label="with autogrowing text area + floatingLabel" floatingLabel>
145 <paper-autogrow-textarea>
146 <textarea></textarea>
147 </paper-autogrow-textarea>
148 </paper-input-decorator>
150 </section>
152 <section id="validate">
154 <div>Validation</div>
156 <button onclick="validateAll()">click me to validate all</button>
158 <paper-input-decorator label="required" floatingLabel error="input is required!">
159 <input is="core-input" required>
160 </paper-input-decorator>
162 <script>
163 function validateAll() {
164 var $d = document.getElementById('validate').querySelectorAll('paper-input-decorator');
165 Array.prototype.forEach.call($d, function(d) {
166 d.isInvalid = !d.querySelector('input').validity.valid;
169 </script>
171 </section>
173 <section>
175 <div>Custom styling</div>
177 <br>
179 <paper-input class="custom" label="paper-input"></paper-input>
181 <br>
183 <paper-input-decorator class="custom" label="decorator">
184 <input is="core-input">
185 </paper-input-decorator>
187 </section>
189 </body>
190 </html>