-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathux-input.css.js
92 lines (77 loc) · 1.82 KB
/
ux-input.css.js
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = `
:host {
outline: none;
height: 3em;
box-sizing: border-box;
font-size: inherit;
font-family: inherit;
position: relative;
display: inline-block;
vertical-align: text-bottom; }
:host * {
box-sizing: border-box; }
:host(.is-multiline) {
height: 150px; }
:host(.is-hidden) {
display: none; }
:host(.is-disabled) {
cursor: not-allowed; }
.textfield {
overflow: hidden;
line-height: 1em;
background-color: white;
text-align: left;
padding: 0.875em .85em;
height: inherit;
font-size: 1em;
font-family: inherit;
font-weight: inherit;
outline: none;
border: 1px solid #dfdfdf;
width: 100%;
color: #444;
display: block;
cursor: inherit;
border-radius: 3px;
transition: all 0.2s ease-in-out; }
.textfield:focus {
border-color: var(--ux-input-primary, #298eea); }
:host(.is-disabled) .textfield {
background: rgb(235, 235, 228); }
:host(:not(.is-multiline)) .textfield {
white-space: nowrap; }
:host(.is-multiline) .textfield {
word-break: break-all; }
:host(.is-active) .textfield {
padding: 1.3em 0.85em 0.45em 0.85em; }
:host(:not(.is-active)) div.textfield::before {
position: absolute;
display: inline-block;
margin-top: 2px;
content: attr(placeholder);
opacity: 0.6; }
label {
position: absolute;
top: 6px;
padding: 0;
left: 1.3em;
font-size: 0.7em;
font-weight: 500;
color: #bbbbbb;
display: block;
opacity: 0;
/*z-index: 10;*/
cursor: inherit;
transition: all 0.2s ease-in-out; }
:host(.is-focused) label {
color: #298eea; }
:host(.is-active) label {
opacity: 1 }
:host(.is-optional)::after {
position: absolute;
right: 1em;
top: 0.3em;
font-size: 0.6em;
color: #ccc;
content: 'optional'; }
`