-
Notifications
You must be signed in to change notification settings - Fork 2
/
jquery.SmartPlaceholders.css
74 lines (66 loc) · 1.97 KB
/
jquery.SmartPlaceholders.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* ==================== */
/* SmartPlaceholders.js */
/* ==================== */
/* For positioning smart placeholder relative to input */
.smart-placeholder-wrapper {
position: relative;
}
.smart-placeholder {
position: absolute;
top: 0; left: 0;
z-index: 10;
visibility: hidden;
opacity: 0;
-webkit-transition: 0.1s ease-in-out;
-moz-transition: 0.1s ease-in-out;
transition: 0.1s ease-in-out;
}
/* For giving space for smart placeholder to appear */
.smart-placeholder-wrapper.populated input,
.smart-placeholder-wrapper.focused input,
.smart-placeholder-wrapper.populated textarea,
.smart-placeholder-wrapper.focused textarea {
padding-top: 2em;
}
/* Show smart placeholder when we have content or are about to enter content */
.smart-placeholder-wrapper.populated .smart-placeholder,
.smart-placeholder-wrapper.focused .smart-placeholder {
visibility: visible;
opacity: 1;
}
.smart-placeholder-wrapper input,
.smart-placeholder-wrapper textarea {
-webkit-transition: 0.1s ease-in-out;
-moz-transition: 0.1s ease-in-out;
transition: 0.1s ease-in-out;
}
/* For hiding input default placeholder on focus */
.smart-placeholder-wrapper.focused ::-webkit-input-placeholder {
color: transparent;
}
.smart-placeholder-wrapper.focused :-moz-placeholder {
color: transparent;
}
.smart-placeholder-wrapper.focused ::-moz-placeholder {
color: transparent;
}
.smart-placeholder-wrapper.focused :-ms-input-placeholder {
color: transparent;
}
/* Animation for placeholder text */
.smart-placeholder-wrapper ::-webkit-input-placeholder {
-webkit-transition: 0.1s ease-in-out;
transition: 0.1s ease-in-out;
}
.smart-placeholder-wrapper :-moz-placeholder {
-moz-transition: 0.1s ease-in-out;
transition: 0.1s ease-in-out;
}
.smart-placeholder-wrapper ::-moz-placeholder {
-moz-transition: 0.1s ease-in-out;
transition: 0.1s ease-in-out;
}
.smart-placeholder-wrapper :-ms-input-placeholder {
-ms-transition: 0.1s ease-in-out;
transition: 0.1s ease-in-out;
}