-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathms.css
More file actions
185 lines (158 loc) · 4.02 KB
/
ms.css
File metadata and controls
185 lines (158 loc) · 4.02 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
.typeahead-container {
position: relative;
min-width: 250px;
display: flex;
flex-direction: column;
}
.multi-typeahead {
width: 100%;
margin: 1rem auto;
position: relative;
font-family: sans-serif;
}
.selected-chips {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-bottom: 0.25rem;
}
.chip {
background: #f1f3f4;
border-radius: 20px;
padding: 0 10px;
display: inline-flex;
align-items: center;
font-size: 0.9rem;
line-height: 1.5;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
margin: 2px;
}
.chip button {
border: none;
background: transparent;
color: #666;
font-size: 1rem;
margin-left: 6px;
cursor: pointer;
}
.chip button:hover {
color: #e53935;
}
#typeaheadInput {
width: 100%;
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #ccc;
font-size: 1rem;
}
.suggestions {
list-style: none;
margin: 0;
padding: 0;
border: 1px solid #ccc;
border-top: none;
max-height: 180px;
overflow-y: auto;
background: white;
position: absolute;
width: 100%;
z-index: 999;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
display: none;
}
.suggestions li {
padding: 0.5rem;
cursor: pointer;
}
.suggestions li:hover,
.suggestions li.active {
background: #f0f0f0;
}
/* Layout container */
.container {
max-width: 820px;
}
/* Demo card */
.demo-card .card-body {
padding: 1.25rem 1.25rem 1.5rem;
}
/* Input + list visual cohesion */
#typeaheadInput {
border-radius: .5rem;
border-color: #d7d7d7;
transition: border-color .15s ease, box-shadow .15s ease;
}
#typeaheadInput:focus {
border-color: #74a7ff;
box-shadow: 0 0 0 .2rem rgba(116, 167, 255, .2);
outline: none;
}
/* Suggestions: attach to input edge, soften corners */
.suggestions {
border: 1px solid #d7d7d7;
border-top: none;
border-bottom-left-radius: .5rem;
border-bottom-right-radius: .5rem;
box-shadow: 0 4px 16px rgba(0,0,0,.06);
animation: fadeIn .08s ease-out;
}
/* Suggestion items: tighter rhythm & active contrast */
.suggestions li {
padding: .5rem .75rem;
}
.suggestions li:hover,
.suggestions li.active {
background: #e8f0fe;
}
/* Chips: cleaner spacing and hit area */
.selected-chips {
gap: .35rem;
margin-bottom: .35rem;
}
.chip {
background: #f1f3f4;
border-radius: 999px;
padding: .2rem .6rem;
display: inline-flex;
align-items: center;
gap: .4rem;
font-size: .9rem;
line-height: 1.6;
}
.chip button {
width: 1.25rem;
height: 1.25rem;
line-height: 1;
display: inline-grid;
place-items: center;
border-radius: 999px;
}
.chip button:hover {
background: rgba(0,0,0,.06);
}
/* Make the dropdown sit flush under the input */
.multi-typeahead {
position: relative;
}
/* Small motion for list entrance */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-2px); }
to { opacity: 1; transform: translateY(0); }
}
/* Touch-friendly: increase targets on mobile */
@media (hover: none) {
.suggestions li { padding: .75rem .9rem; }
.chip button { width: 1.4rem; height: 1.4rem; }
}
/* Optional: dark mode support */
@media (prefers-color-scheme: dark) {
body { background: #0f1116; color: #e5e7eb; }
.card { background: #111827; border-color: #1f2937; }
#typeaheadInput { background: #111827; color: #e5e7eb; border-color: #334155; }
.suggestions { background: #0b1220; border-color: #223047; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.suggestions li { color: #e5e7eb; }
.suggestions li:hover,
.suggestions li.active { background: #17223b; }
.chip { background: #1f2937; color: #e5e7eb; }
.chip button:hover { background: #2b3648; }
}