|
6 | 6 | --menu-max-height: 400px;
|
7 | 7 | --input-width: 300px;
|
8 | 8 | --font-size: 16px;
|
9 |
| - --border-radius: 8px; |
10 |
| - --transition: 200ms; |
| 9 | + --border-radius: 8px 8px 8px 8px; |
11 | 10 | --active-menu-shadow: 1px 1px 5px 0px gray;
|
12 |
| - --option-bg-hover: rgb(233, 233, 233); |
13 | 11 | --line-height: 1.4;
|
| 12 | + --active-menu-background: white; |
| 13 | + --active-menu-radius: var(--border-radius); |
14 | 14 | }
|
15 | 15 |
|
16 | 16 | .msl-wrp * {
|
|
36 | 36 | border-radius: var(--border-radius);
|
37 | 37 | outline: none;
|
38 | 38 | cursor: text;
|
| 39 | + transition: border-radius 200ms; |
39 | 40 | }
|
40 | 41 | .msl:not(.msl-active, .msl-active-up):hover {
|
41 | 42 | border-color: rgb(80, 80, 80);
|
42 | 43 | }
|
43 | 44 | .msl-active {
|
44 |
| - background-color: white; |
| 45 | + background: var(--active-menu-background); |
45 | 46 | box-shadow: var(--active-menu-shadow);
|
46 | 47 | z-index: 9999;
|
47 | 48 | border-color: transparent;
|
48 |
| - border-radius: var(--border-radius) var(--border-radius) 0 0; |
| 49 | + border-radius: var(--active-menu-radius); |
| 50 | + border-bottom-left-radius: 0; |
| 51 | + border-bottom-right-radius: 0; |
| 52 | + border-bottom: 0; |
| 53 | + transition: border-top-left-radius 400ms, border-top-right-radius 400ms; |
49 | 54 | }
|
50 | 55 | .msl-active-up {
|
51 |
| - background-color: white; |
| 56 | + background: var(--active-menu-background); |
52 | 57 | box-shadow: var(--active-menu-shadow);
|
53 | 58 | z-index: 9999;
|
54 | 59 | border-color: transparent;
|
55 |
| - border-radius: 0 0 var(--border-radius) var(--border-radius); |
| 60 | + border-radius: var(--active-menu-radius); |
| 61 | + border-top-left-radius: 0; |
| 62 | + border-top-right-radius: 0; |
| 63 | + transition: border-bottom-left-radius 400ms, border-bottom-right-radius 400ms; |
56 | 64 | }
|
57 | 65 | .msl-active ~ .msl-options {
|
| 66 | + background: var(--active-menu-background); |
58 | 67 | z-index: 9999;
|
59 | 68 | box-shadow: var(--active-menu-shadow);
|
60 | 69 | clip-path: inset(0px -10px -10px -10px);
|
61 | 70 | max-height: var(--menu-max-height);
|
62 |
| - border-radius: 0 0 var(--border-radius) var(--border-radius); |
| 71 | + border-radius: var(--active-menu-radius); |
| 72 | + border-top-left-radius: 0; |
| 73 | + border-top-right-radius: 0; |
| 74 | + transition: border-bottom-left-radius 0.5s ease-in, border-bottom-right-radius 0.5s ease-in; |
63 | 75 | }
|
64 | 76 | .msl-active-up ~ .msl-options {
|
| 77 | + background: var(--active-menu-background); |
65 | 78 | z-index: 9999;
|
66 | 79 | bottom: 99%;
|
67 | 80 | box-shadow: var(--active-menu-shadow);
|
68 | 81 | clip-path: inset(-10px -10px 0 -10px);
|
69 | 82 | max-height: var(--menu-max-height);
|
70 |
| - border-radius: var(--border-radius) var(--border-radius) 0 0; |
| 83 | + border-radius: var(--active-menu-radius); |
| 84 | + border-bottom: 0; |
| 85 | + border-bottom-right-radius: 0; |
| 86 | + border-bottom-left-radius: 0; |
| 87 | + transition: border-top-left-radius 700ms, border-top-right-radius 700ms; |
| 88 | +} |
| 89 | +.msl-options { |
| 90 | + position: absolute; |
| 91 | + width: 100%; |
| 92 | + background: white; |
| 93 | + max-height: 0; |
| 94 | + overflow: auto; |
| 95 | + scrollbar-color: rgb(0, 0, 0, 0.1) transparent; |
| 96 | + scrollbar-width: thin; |
| 97 | + border-radius: var(--border-radius); |
71 | 98 | }
|
72 | 99 | .msl-input-wrp {
|
73 | 100 | display: inline-block;
|
|
91 | 118 | }
|
92 | 119 | .msl-chip {
|
93 | 120 | background: rgb(238, 238, 238);
|
94 |
| - border-radius: calc(var(--border-radius) - 3px); |
| 121 | + border-radius: 5px; |
95 | 122 | margin: 5px;
|
96 | 123 | padding: 3px 3px 3px 6px;
|
97 | 124 | white-space: nowrap;
|
98 |
| - font-size: calc(var(--font-size) - 3px); |
| 125 | + font-size: var(--font-size); |
99 | 126 | display: inline-flex;
|
100 | 127 | align-items: center;
|
101 | 128 | line-break: anywhere;
|
|
112 | 139 | line-break: strict;
|
113 | 140 | white-space: nowrap;
|
114 | 141 | }
|
115 |
| -.msl-options { |
116 |
| - position: absolute; |
117 |
| - width: 100%; |
118 |
| - background: white; |
119 |
| - max-height: 0; |
120 |
| - overflow: auto; |
121 |
| - scrollbar-color: rgb(0, 0, 0, 0.1) transparent; |
122 |
| - scrollbar-width: thin; |
123 |
| -} |
124 | 142 | .msl-options::-webkit-scrollbar {
|
125 | 143 | width: 8px;
|
126 | 144 | }
|
|
139 | 157 | .msl-options .msl-option,
|
140 | 158 | .msl-grp-title {
|
141 | 159 | font-size: var(--font-size);
|
142 |
| - border-radius: calc(var(--border-radius) - 3px); |
| 160 | + border-radius: 5px; |
143 | 161 | padding: 7px 5px;
|
144 | 162 | cursor: pointer;
|
145 | 163 | margin: 4px 6px 4px;
|
|
168 | 186 | }
|
169 | 187 | .msl-options .msl-option:hover,
|
170 | 188 | .msl-option:focus {
|
171 |
| - background: var(--option-bg-hover); |
| 189 | + background: rgb(233, 233, 233); |
172 | 190 | }
|
173 | 191 | .msl-option-active {
|
174 | 192 | background: #e6f4fa;
|
|
199 | 217 | height: 25px;
|
200 | 218 | }
|
201 | 219 |
|
202 |
| -.msl-clear-btn .msl-close-icn { |
203 |
| - transform: scale(0.7); |
204 |
| -} |
205 |
| - |
206 | 220 | .msl-clear-btn:hover,
|
207 | 221 | .msl-arrow-btn:hover {
|
208 | 222 | background: lightgray;
|
209 | 223 | }
|
210 | 224 |
|
211 | 225 | .msl-close-icn > line,
|
212 | 226 | .msl-arrow-icn > line {
|
213 |
| - stroke-width: 1.2; |
214 |
| - stroke-linecap: round; |
215 |
| - stroke: rgb(0, 0, 0, 0.6); |
| 227 | + stroke-width: 1; |
216 | 228 | }
|
217 | 229 |
|
218 | 230 | .msl-arrow-icn {
|
219 | 231 | height: 20px;
|
220 | 232 | width: 20px;
|
221 |
| - transform: scale(0.8); |
222 | 233 | }
|
223 | 234 |
|
224 | 235 | .msl-chip-delete {
|
|
228 | 239 | min-height: 20px;
|
229 | 240 | margin-left: 3px;
|
230 | 241 | background: rgb(218, 218, 218);
|
| 242 | + color: rgb(0, 0, 0, 0.6); |
231 | 243 | }
|
232 | 244 | .msl-chip-delete:hover {
|
233 | 245 | background: lightgray;
|
234 | 246 | }
|
235 | 247 |
|
236 |
| -.msl-chip-delete .msl-close-icn { |
237 |
| - transform: scale(0.6); |
238 |
| -} |
239 | 248 | .msl-chip-delete .msl-close-icn > line {
|
240 | 249 | stroke-width: 1;
|
241 | 250 | }
|
242 | 251 |
|
243 | 252 | .msl-close-icn {
|
244 |
| - height: 15px; |
245 |
| - width: 15px; |
| 253 | + height: 10px; |
| 254 | + width: 10px; |
246 | 255 | }
|
0 commit comments