forked from taufik-nurrohman/tag-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtag-picker.css
82 lines (82 loc) · 1.53 KB
/
tag-picker.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
75
76
77
78
79
80
81
82
.tag-picker,
.tag-picker * {
box-sizing: border-box;
font: inherit;
color: inherit;
}
.tag-picker,
.tag-picker .tags {
display: flex;
flex: 1;
flex-wrap: wrap;
min-height: 1.5em;
line-height: 1.5em;
}
.tag-picker {
border: 1px solid;
padding: .125em;
cursor: text;
}
.tag-picker .tag {
background: #f00;
color: #000;
text-decoration: none;
margin: .125em;
padding: 0 .5em;
height: 1.5em; /* Same with `min-height` of container */
cursor: pointer;
outline: none;
}
.tag-picker .tag[title]::before {
content: attr(title);
}
.tag-picker .tag[title] a {
margin-left: .5em;
text-decoration: none;
color: #fff;
outline: none;
}
.tag-picker .tag[title] a::before {
content: '\00d7'; /* The “×” button */
}
.tag-picker .tag:focus {
background: #c00;
}
.tag-picker .editor {
background: none;
color: inherit;
cursor: inherit;
position: relative;
flex: 1;
}
.tag-picker .editor span {
display: block;
height: 100%;
outline: none;
position: relative;
z-index: 1;
}
.tag-picker .editor span + span {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: inherit;
white-space: nowrap;
z-index: 0;
opacity: .5;
}
.tag-picker .tag + .editor span + span {
display: none; /* Hide the placeholder if we have at least one tag */
}
.tag-picker-source {
position: fixed;
top: -9999px;
left: -9999px;
}
.tag-picker-source[disabled] + .tag-picker,
.tag-picker-source[disabled] + .tag-picker *,
.tag-picker-source[readonly] + .tag-picker .tag[title] a {
cursor: not-allowed;
}