Skip to content

Commit 88e0aa6

Browse files
committed
fix: ui layout issues in snippets list header
1 parent 75e0797 commit 88e0aa6

File tree

1 file changed

+111
-38
lines changed

1 file changed

+111
-38
lines changed

src/styles/Extn-CustomSnippets.less

Lines changed: 111 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,14 @@
151151
}
152152

153153
#snippets-list-header {
154-
display: flex;
155-
align-items: center;
156-
padding: 6px 13px;
154+
display: block;
155+
padding: 4px 12px 4px 16px;
157156
margin: 0;
158157
border: none;
159-
font-weight: 700;
160158
background-color: #c2c7c7;
159+
font-size: 0;
160+
white-space: nowrap;
161+
line-height: 20px;
161162

162163
.dark & {
163164
background-color: #202020;
@@ -166,41 +167,91 @@
166167

167168
#snippet-abbr-header,
168169
#snippet-abbr {
169-
flex: 1;
170+
width: 15%;
170171
min-width: 80px;
172+
display: inline-block;
173+
vertical-align: middle;
174+
box-sizing: border-box;
175+
font-size: 14px;
176+
font-weight: 500;
177+
line-height: 20px;
178+
white-space: nowrap;
179+
overflow: hidden;
180+
text-overflow: ellipsis;
171181
}
172182

173183
#snippet-template-header,
174184
#snippet-template {
175-
flex: 2.4;
176-
min-width: 100px;
185+
width: 35%;
186+
min-width: 120px;
187+
display: inline-block;
188+
vertical-align: middle;
189+
padding: 0 12px;
190+
box-sizing: border-box;
191+
font-size: 14px;
192+
font-weight: 500;
193+
line-height: 20px;
194+
white-space: nowrap;
195+
overflow: hidden;
196+
text-overflow: ellipsis;
177197
}
178198

179199
#snippet-description-header,
180200
#snippet-description {
181-
flex: 1.5;
182-
min-width: 80px;
201+
width: 25%;
202+
min-width: 100px;
203+
display: inline-block;
204+
vertical-align: middle;
205+
padding: 0 12px;
206+
box-sizing: border-box;
207+
font-size: 14px;
208+
font-weight: 500;
209+
line-height: 20px;
210+
white-space: nowrap;
211+
overflow: hidden;
212+
text-overflow: ellipsis;
183213
}
184214

185215
#snippet-file-extension-header,
186216
#snippet-files {
187-
flex: 0.8;
217+
width: 15%;
188218
min-width: 60px;
219+
display: inline-block;
220+
vertical-align: middle;
189221
text-align: center;
222+
box-sizing: border-box;
223+
font-size: 14px;
224+
font-weight: 500;
225+
line-height: 20px;
226+
white-space: nowrap;
227+
overflow: hidden;
228+
text-overflow: ellipsis;
229+
}
230+
231+
#snippet-actions-header {
232+
width: 10%;
233+
min-width: 40px;
234+
display: inline-block;
235+
vertical-align: middle;
236+
box-sizing: border-box;
237+
font-size: 14px;
238+
font-weight: 500;
239+
line-height: 20px;
190240
}
191241

192242
.snippet-item {
193-
display: flex;
194-
align-items: center;
195-
padding: 4px 12px 4px 16px;
243+
display: block;
244+
padding: 2px 12px 2px 16px;
196245
margin: 0;
197246
border-bottom: 1px solid transparent;
198247
background-color: @bc-panel-bg;
199248
color: @bc-text;
200-
line-height: 16px;
201249
position: relative;
202250
cursor: pointer;
203251
transition: background-color 0.1s ease;
252+
font-size: 0;
253+
white-space: nowrap;
254+
line-height: 20px;
204255

205256
.dark & {
206257
background-color: @dark-bc-panel-bg;
@@ -238,62 +289,84 @@
238289
}
239290
}
240291

292+
#snippet-abbr-header {
293+
color: @bc-text;
294+
295+
.dark & {
296+
color: @dark-bc-text;
297+
}
298+
}
299+
241300
#snippet-abbr {
242301
color: @bc-text;
243-
white-space: nowrap;
244-
overflow: hidden;
245-
text-overflow: ellipsis;
302+
303+
.dark & {
304+
color: @dark-bc-text;
305+
}
306+
}
307+
308+
#snippet-template-header {
309+
color: @bc-text;
246310

247311
.dark & {
248312
color: @dark-bc-text;
249313
}
250314
}
251315

252316
#snippet-template {
253-
margin: 0 12px;
254317
color: @bc-text-thin;
255-
white-space: nowrap;
256-
overflow: hidden;
257-
text-overflow: ellipsis;
258318

259319
.dark & {
260320
color: @dark-bc-text-thin;
261321
}
262322
}
263323

324+
#snippet-description-header {
325+
color: @bc-text;
326+
327+
.dark & {
328+
color: @dark-bc-text;
329+
}
330+
}
331+
264332
#snippet-description {
265-
margin: 0 12px;
266333
color: @bc-text-thin-quiet;
267-
white-space: nowrap;
268-
overflow: hidden;
269-
text-overflow: ellipsis;
270334

271335
.dark & {
272336
color: @dark-bc-text-thin-quiet;
273337
}
274338
}
275339

340+
#snippet-file-extension-header {
341+
color: @bc-text;
342+
343+
.dark & {
344+
color: @dark-bc-text;
345+
}
346+
}
347+
276348
#snippet-files {
277349
color: @bc-text-thin-quiet;
278-
white-space: nowrap;
279-
overflow: hidden;
280-
text-overflow: ellipsis;
281350

282351
.dark & {
283352
color: @dark-bc-text-thin-quiet;
284353
}
285354
}
286355

287356
.delete-snippet-btn {
357+
width: 10%;
358+
min-width: 40px;
359+
display: inline-block;
360+
vertical-align: middle;
361+
box-sizing: border-box;
288362
color: @bc-text-thin-quiet;
289363
cursor: pointer;
290364
opacity: 0.3;
291365
transition: opacity 0.1s ease;
292-
display: flex;
293-
align-items: center;
294-
justify-content: center;
295-
font-size: 0.9rem;
296-
padding: 3px 6px;
366+
text-align: center;
367+
font-size: 14px;
368+
line-height: 20px;
369+
padding: 0;
297370

298371
.dark & {
299372
color: @dark-bc-text-thin-quiet;
@@ -309,11 +382,11 @@
309382
}
310383

311384
i {
312-
width: 12px;
313-
height: 12px;
314-
display: flex;
315-
align-items: center;
316-
justify-content: center;
385+
display: inline-block;
386+
text-align: center;
387+
font-size: 12px;
388+
line-height: 20px;
389+
vertical-align: middle;
317390
}
318391
}
319392

0 commit comments

Comments
 (0)