UNPKG

5.74 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 /*rtl:ignore*/
33 left: 0;
34 /* @noflip */
35 /*rtl:ignore*/
36 -webkit-transform-origin: left top;
37 /* @noflip */
38 /*rtl:ignore*/
39 transform-origin: left top;
40 line-height: 1.15rem;
41 text-align: left;
42 text-overflow: ellipsis;
43 white-space: nowrap;
44 cursor: text;
45 overflow: hidden;
46 /* @alternate */
47 will-change: transform;
48 transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
49 transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);
50 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);
51}
52[dir=rtl] .mdc-floating-label, .mdc-floating-label[dir=rtl] {
53 /*rtl:begin:ignore*/
54 /* @noflip */
55 /*rtl:ignore*/
56 right: 0;
57 /* @noflip */
58 /*rtl:ignore*/
59 left: auto;
60 /* @noflip */
61 /*rtl:ignore*/
62 -webkit-transform-origin: right top;
63 /* @noflip */
64 /*rtl:ignore*/
65 transform-origin: right top;
66 /* @noflip */
67 /*rtl:ignore*/
68 text-align: right;
69 /*rtl:end:ignore*/
70}
71
72.mdc-floating-label--float-above {
73 cursor: auto;
74}
75
76.mdc-floating-label--required::after {
77 /* @noflip */
78 /*rtl:ignore*/
79 margin-left: 1px;
80 /* @noflip */
81 /*rtl:ignore*/
82 margin-right: 0px;
83 content: "*";
84}
85[dir=rtl] .mdc-floating-label--required, .mdc-floating-label--required[dir=rtl] {
86 /*rtl:begin:ignore*/
87 /*rtl:end:ignore*/
88}
89[dir=rtl] .mdc-floating-label--required::after, .mdc-floating-label--required[dir=rtl]::after {
90 /* @noflip */
91 /*rtl:ignore*/
92 margin-left: 0;
93 /* @noflip */
94 /*rtl:ignore*/
95 margin-right: 1px;
96}
97
98.mdc-floating-label--float-above {
99 -webkit-transform: translateY(-106%) scale(0.75);
100 transform: translateY(-106%) scale(0.75);
101}
102
103.mdc-floating-label--shake {
104 -webkit-animation: mdc-floating-label-shake-float-above-standard 250ms 1;
105 animation: mdc-floating-label-shake-float-above-standard 250ms 1;
106}
107
108@-webkit-keyframes mdc-floating-label-shake-float-above-standard {
109 0% {
110 /* @noflip */
111 /*rtl:ignore*/
112 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
113 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
114 }
115 33% {
116 -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
117 animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
118 /* @noflip */
119 /*rtl:ignore*/
120 -webkit-transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
121 transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
122 }
123 66% {
124 -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
125 animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
126 /* @noflip */
127 /*rtl:ignore*/
128 -webkit-transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
129 transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
130 }
131 100% {
132 /* @noflip */
133 /*rtl:ignore*/
134 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
135 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
136 }
137}
138
139@keyframes mdc-floating-label-shake-float-above-standard {
140 0% {
141 /* @noflip */
142 /*rtl:ignore*/
143 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
144 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
145 }
146 33% {
147 -webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
148 animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
149 /* @noflip */
150 /*rtl:ignore*/
151 -webkit-transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
152 transform: translateX(calc(4% - 0%)) translateY(-106%) scale(0.75);
153 }
154 66% {
155 -webkit-animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
156 animation-timing-function: cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);
157 /* @noflip */
158 /*rtl:ignore*/
159 -webkit-transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
160 transform: translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75);
161 }
162 100% {
163 /* @noflip */
164 /*rtl:ignore*/
165 -webkit-transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
166 transform: translateX(calc(0 - 0%)) translateY(-106%) scale(0.75);
167 }
168}
169
170/*# sourceMappingURL=mdc.floating-label.css.map*/
\No newline at end of file