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

Unified Diff: lib/src/paper-input/paper-input-container.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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/paper-input/paper-input-behavior.html ('k') | lib/src/paper-input/paper-input-error.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/paper-input/paper-input-container.html
diff --git a/lib/src/paper-input/paper-input-container.html b/lib/src/paper-input/paper-input-container.html
index 25ab4f8b4b62cd960a2f6c738047274944852c38..5892060170c64797c65a0eca75c689197575427d 100644
--- a/lib/src/paper-input/paper-input-container.html
+++ b/lib/src/paper-input/paper-input-container.html
@@ -75,15 +75,15 @@ Custom property | Description | Default
`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--google-red-500`
`--paper-input-container-input-color` | Input foreground color | `--primary-text-color`
`--paper-input-container` | Mixin applied to the container | `{}`
+`--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}`
`--paper-input-container-label` | Mixin applied to the label | `{}`
`--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}`
`--paper-input-container-input` | Mixin applied to the input | `{}`
-`--paper-input-container-input-disabled` | Mixin applied to the input when it's disabled | `{}`
-`--paper-input-container-prefix` | Mixin applied to the input prefix | `{}`
-`--paper-input-container-suffix` | Mixin applied to the input suffix | `{}`
`--paper-input-container-underline` | Mixin applied to the underline | `{}`
`--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focued | `{}`
`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}`
+`--paper-input-prefix` | Mixin applied to the input prefix | `{}`
+`--paper-input-suffix` | Mixin applied to the input suffix | `{}`
This element is `display:block` by default, but you can set the `inline` attribute to make it
`display:inline-block`.
@@ -186,19 +186,24 @@ This element is `display:block` by default, but you can set the `inline` attribu
font: inherit;
color: var(--paper-input-container-color, --secondary-text-color);
+ @apply(--paper-font-common-nowrap);
@apply(--paper-font-subhead);
@apply(--paper-input-container-label);
}
.input-content.label-is-floating ::content label,
.input-content.label-is-floating ::content .paper-input-label {
- -webkit-transform: translate3d(0, -75%, 0) scale(0.75);
- transform: translate3d(0, -75%, 0) scale(0.75);
+ -webkit-transform: translateY(-75%) scale(0.75);
+ transform: translateY(-75%) scale(0.75);
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transition: -webkit-transform 0.25s;
transition: transform 0.25s;
+ /* Since we scale to 75/100 of the size, we actually have 100/75 of the
+ original space now available */
+ width: 133%;
+
@apply(--paper-transition-easing);
}
@@ -231,6 +236,7 @@ This element is `display:block` by default, but you can set the `inline` attribu
background: transparent;
border: none;
color: var(--paper-input-container-input-color, --primary-text-color);
+ -webkit-appearance: none;
@apply(--paper-font-subhead);
@apply(--paper-input-container-input);
@@ -328,7 +334,7 @@ This element is `display:block` by default, but you can set the `inline` attribu
/**
* True if the input is invalid. This property is set automatically when the input value
- * changes if auto-validating, or when the `iron-input-valid` event is heard from a child.
+ * changes if auto-validating, or when the `iron-input-validate` event is heard from a child.
*/
invalid: {
observer: '_invalidChanged',
@@ -531,9 +537,9 @@ This element is `display:block` by default, but you can set the `inline` attribu
}
// The label might have a horizontal offset if a prefix element exists
// which needs to be undone when displayed as a floating label.
- if (this.$.prefix && label && label.offsetParent &&
- Polymer.dom(this.$.prefix).getDistributedNodes().length > 0) {
- label.style.left = -label.offsetParent.offsetLeft + 'px';
+ if (Polymer.dom(this.$.prefix).getDistributedNodes().length > 0 &&
+ label && label.offsetParent) {
+ label.style.left = -label.offsetParent.offsetLeft + 'px';
}
} else {
// When the label is not floating, it should overlap the input element.
« no previous file with comments | « lib/src/paper-input/paper-input-behavior.html ('k') | lib/src/paper-input/paper-input-error.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698