:host { display: inline-block; outline: none; text-align: inherit; color: #757575; } :host(:hover) { cursor: text; } #container { position: relative; } #inputClone, #minInputHeight, #maxInputHeight { position: absolute; top: 0; left: 0; visibility: hidden; padding: 0.5em 0; } :host /deep/ input, :host /deep/ textarea { font: inherit; color: #000; padding: 0; /* Important to use margin here so the margin remains visible * when textarea scrolls internally. */ margin: 0.5em 0; background-color: transparent; border: none; outline: none; width: 100%; } :host /deep/ input:invalid, :host /deep/ textarea:invalid { box-shadow: none; } .host /deep/ textarea { resize: none; } #floatedLabel { font-size: 0.75em; background: transparent; white-space: nowrap; } #floatedLabel.hidden { visibility: hidden; } #floatedLabel.focused { visibility: visible; } #label { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; padding: 0.5em 0; background: transparent; -moz-transform-origin: 0% 0%; -webkit-transform-origin: 0% 0%; transform-origin: 0% 0%; pointer-events: none; } #label.hidden { display: none; } #label.animating { /* TODO: transforms are unprefixed in M36/ Remove when stable. */ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); } #labelSpan { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 100%; } #errorContainer { visibility: hidden; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; } :host(.invalid) #errorContainer { visibility: visible; } #error { -webkit-flex: 1; flex: 1; font-size: 0.75em; padding: 0.5em 0; } #errorIcon { background-image: url(error-100.png); background-size: 24px 24px; height: 24px; width: 24px; } @media (min-resolution: 2dppx) { #errorIcon { background-image: url(error-200.png); background-size: 24px 24px; } } #underlineContainer { position: absolute; left: 0; right: 0; bottom: -1px; } :host([multiline]) #underlineContainer { bottom: auto; } :host([multiline]) #underlineContainer.animating { -webkit-transition: top 0.2s ease-in; transition: top 0.2s ease-in; } #underline { height: 1px; background: #757575; border-bottom-color: #757575; } :host([disabled]) #underline { border-bottom: 1px dashed; height: 0px; background: transparent; } #underlineHighlight { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; -webkit-transform: scale(0,2); transform: scale(0,2); } #underlineHighlight.pressed { -webkit-transform: scale(0.1,2); transform: scale(0.1,2); /* TODO: transforms are unprefixed in M36/ Remove when stable. */ -webkit-transition: -webkit-transform 0.1s cubic-bezier(0.2, 0, 0.03, 1); transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); } #underlineHighlight.animating { /* TODO: transforms are unprefixed in M36/ Remove when stable. */ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); } #underlineHighlight.focused { -webkit-transform: scale(1); transform: scale(1); } #caret { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: 0; -moz-transform-origin: 0%; -webkit-transform-origin-x: 0%; transform-origin-x: 0%; -webkit-transform: scaleX(1) translateX(10%); transform: scaleX(1) translateX(10%); } #caret.animating { display: block; /* TODO: transforms are unprefixed in M36/ Remove when stable. */ -webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-out; transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); } #caret.focused { display: block; opacity: 0.75; -webkit-transform: scaleX(0) translateX(0); transform: scaleX(0) translateX(0); } #caretInner { position: absolute; top: 0.6em; left: 0; height: 1.2em; width: 25%; }