UNPKG

5.06 kBCSSView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE
7 */
8.mdc-floating-label {
9 -moz-osx-font-smoothing: grayscale;
10 -webkit-font-smoothing: antialiased;
11 font-family: Roboto, sans-serif;
12 /* @alternate */
13 font-family: var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));
14 font-size: 1rem;
15 /* @alternate */
16 font-size: var(--mdc-typography-subtitle1-font-size, 1rem);
17 font-weight: 400;
18 /* @alternate */
19 font-weight: var(--mdc-typography-subtitle1-font-weight, 400);
20 letter-spacing: 0.009375em;
21 /* @alternate */
22 letter-spacing: var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);
23 text-decoration: inherit;
24 /* @alternate */
25 -webkit-text-decoration: var(--mdc-typography-subtitle1-text-decoration, inherit);
26 text-decoration: var(--mdc-typography-subtitle1-text-decoration, inherit);
27 text-transform: inherit;
28 /* @alternate */
29 text-transform: var(--mdc-typography-subtitle1-text-transform, inherit);
30 position: absolute;
31 /* @noflip */
32 left: 0;
33 /* @noflip */
34 -webkit-transform-origin: left top;
35 /* @noflip */
36 transform-origin: left top;
37 line-height: 1.15rem;
38 text-align: left;
39 text-overflow: ellipsis;
40 white-space: nowrap;
41 cursor: text;
42 overflow: hidden;
43 /* @alternate */
44 will-change: transform;
45 transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
46 transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);
47 transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
48}
49[dir=rtl] .mdc-floating-label, .mdc-floating-label[dir=rtl] {
50 /* @noflip */
51 right: 0;
52 /* @noflip */
53 left: auto;
54 /* @noflip */
55 -webkit-transform-origin: right top;
56 /* @noflip */
57 transform-origin: right top;
58 /* @noflip */
59 text-align: right;
60}
61
62.mdc-floating-label--float-above {
63 cursor: auto;
64}
65
66.mdc-floating-label--required::after {
67 /* @noflip */
68 margin-left: 1px;
69 /* @noflip */
70 margin-right: 0px;
71 content: "*";
72}
73[dir=rtl] .mdc-floating-label--required::after, .mdc-floating-label--required[dir=rtl]::after {
74 /* @noflip */
75 margin-left: 0;
76 /* @noflip */
77 margin-right: 1px;
78}
79
80.mdc-floating-label--float-above {
81 -webkit-transform: translateY(-106%) scale(0.75);
82 transform: translateY(-106%) scale(0.75);
83}
84
85.mdc-floating-label--shake {
86 -webkit-animation: mdc-floating-label-shake-float-above-standard 250ms 1;
87 animation: mdc-floating-label-shake-float-above-standard 250ms 1;
88}
89
90@-webkit-keyframes mdc-floating-label-shake-float-above-standard {
91 0% {
92 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
93 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
94 }
95 33% {
96 -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
97 animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
98 -webkit-transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
99 transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
100 }
101 66% {
102 -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
103 animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
104 -webkit-transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
105 transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
106 }
107 100% {
108 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
109 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
110 }
111}
112
113@keyframes mdc-floating-label-shake-float-above-standard {
114 0% {
115 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
116 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
117 }
118 33% {
119 -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
120 animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
121 -webkit-transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
122 transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
123 }
124 66% {
125 -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
126 animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
127 -webkit-transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
128 transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
129 }
130 100% {
131 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
132 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
133 }
134}
135
136/*# sourceMappingURL=mdc.floating-label.css.map*/
\No newline at end of file