Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: lib/src/paper-input/paper-input-error.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/paper-input/paper-input-container.html ('k') | lib/src/paper-input/paper-textarea.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 @license 2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 4 This code may only be used under the BSD style license found at http://polymer.g ithub.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/CONTRI BUTORS.txt 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.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/PATEN TS.txt 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 10
(...skipping 19 matching lines...) Expand all
30 `--paper-input-container-invalid-color` | The foreground color of the error | `- -google-red-500` 30 `--paper-input-container-invalid-color` | The foreground color of the error | `- -google-red-500`
31 `--paper-input-error` | Mixin applied to the error | `{ }` 31 `--paper-input-error` | Mixin applied to the error | `{ }`
32 --> 32 -->
33 <dom-module id="paper-input-error"> 33 <dom-module id="paper-input-error">
34 <template> 34 <template>
35 35
36 <style> 36 <style>
37 :host { 37 :host {
38 display: inline-block; 38 display: inline-block;
39 visibility: hidden; 39 visibility: hidden;
40 float: left;
41 40
42 color: var(--paper-input-container-invalid-color, --google-red-500); 41 color: var(--paper-input-container-invalid-color, --google-red-500);
43 42
44 @apply(--paper-font-caption); 43 @apply(--paper-font-caption);
45 @apply(--paper-input-error); 44 @apply(--paper-input-error);
45 position: absolute;
46 } 46 }
47 47
48 :host([invalid]) { 48 :host([invalid]) {
49 visibility: visible; 49 visibility: visible;
50 }; 50 };
51 </style> 51 </style>
52 52
53 <content></content> 53 <content></content>
54 54
55 </template> 55 </template>
56 </dom-module> 56 </dom-module>
57 57
58 <script> 58 <script>
59 Polymer({ 59 Polymer({
60 is: 'paper-input-error', 60 is: 'paper-input-error',
61 61
62 behaviors: [ 62 behaviors: [
63 Polymer.PaperInputAddonBehavior 63 Polymer.PaperInputAddonBehavior
64 ], 64 ],
65 65
66 properties: { 66 properties: {
67 /** 67 /**
68 * True if the error is showing. 68 * True if the error is showing.
69 */ 69 */
70 invalid: { 70 invalid: {
71 readOnly: true, 71 readOnly: true,
72 reflectToAttribute: true, 72 reflectToAttribute: true,
73 type: Boolean 73 type: Boolean
74 } 74 }
75 }, 75 },
76 76
77 update: function(state) { 77 update: function(state) {
78 this._setInvalid(state.invalid); 78 this._setInvalid(state.invalid);
79 } 79 }
80 }); 80 });
81 </script> 81 </script>
OLDNEW
« no previous file with comments | « lib/src/paper-input/paper-input-container.html ('k') | lib/src/paper-input/paper-textarea.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698