Skip to content

Commit 2efd951

Browse files
committed
move label code to "label.css"
1 parent b918300 commit 2efd951

File tree

2 files changed

+57
-58
lines changed

2 files changed

+57
-58
lines changed

web_src/css/modules/label.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,60 @@ a.ui.ui.ui.basic.grey.label:hover {
286286
.ui.large.label {
287287
font-size: 1rem;
288288
}
289+
290+
/* To let labels break up and wrap across multiple lines (issue title, comment event), use "display: contents here" to apply parent layout.
291+
If the labels-list itself needs some layouts, use extra classes or "tw" helpers. */
292+
.labels-list {
293+
display: contents;
294+
font-size: var(--font-size-label); /* it must match the label font size, otherwise the height mismatches */
295+
}
296+
297+
.labels-list a {
298+
max-width: 100%; /* for ellipsis */
299+
}
300+
301+
.labels-list .ui.label {
302+
min-height: 20px;
303+
padding-top: 0;
304+
padding-bottom: 0;
305+
}
306+
307+
.with-labels-list-inline .labels-list .ui.label + .ui.label,
308+
.with-labels-list-inline .labels-list a + a {
309+
margin-left: 0.25em;
310+
}
311+
312+
.with-labels-list-inline .labels-list .ui.label {
313+
line-height: var(--line-height-default);
314+
}
315+
316+
/* Scoped labels with different colors on left and right */
317+
.ui.label.scope-parent {
318+
background: none !important;
319+
padding: 0 !important;
320+
gap: 0 !important;
321+
}
322+
323+
.ui.label.scope-parent > .ui.label {
324+
margin: 0 !important; /* scoped label's margin is handled by the parent */
325+
}
326+
327+
.ui.label.scope-left {
328+
border-bottom-right-radius: 0;
329+
border-top-right-radius: 0;
330+
}
331+
332+
.ui.label.scope-middle {
333+
border-radius: 0;
334+
margin-left: 0;
335+
}
336+
337+
.ui.label.scope-right {
338+
border-bottom-left-radius: 0;
339+
border-top-left-radius: 0;
340+
}
341+
342+
.ui.label.archived-label {
343+
filter: grayscale(0.5);
344+
opacity: 0.5;
345+
}

web_src/css/repo.css

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,64 +1555,6 @@ td .commit-summary {
15551555
border-bottom-right-radius: 4px;
15561556
}
15571557

1558-
/* To let labels break up and wrap across multiple lines (issue title, comment event), use "display: contents here" to apply parent layout.
1559-
If the labels-list itself needs some layouts, use extra classes or "tw" helpers. */
1560-
.labels-list {
1561-
display: contents;
1562-
font-size: var(--font-size-label); /* it must match the label font size, otherwise the height mismatches */
1563-
}
1564-
1565-
.labels-list a {
1566-
max-width: 100%; /* for ellipsis */
1567-
}
1568-
1569-
.labels-list .ui.label {
1570-
min-height: 20px;
1571-
padding-top: 0;
1572-
padding-bottom: 0;
1573-
}
1574-
1575-
.with-labels-list-inline .labels-list .ui.label + .ui.label,
1576-
.with-labels-list-inline .labels-list a + a {
1577-
margin-left: 0.25em;
1578-
}
1579-
1580-
.with-labels-list-inline .labels-list .ui.label {
1581-
line-height: var(--line-height-default);
1582-
}
1583-
1584-
1585-
/* Scoped labels with different colors on left and right */
1586-
.ui.label.scope-parent {
1587-
background: none !important;
1588-
padding: 0 !important;
1589-
gap: 0 !important;
1590-
}
1591-
1592-
.ui.label.scope-parent > .ui.label {
1593-
margin: 0 !important; /* scoped label's margin is handled by the parent */
1594-
}
1595-
1596-
.archived-label {
1597-
filter: grayscale(0.5);
1598-
opacity: 0.5;
1599-
}
1600-
1601-
.ui.label.scope-left {
1602-
border-bottom-right-radius: 0;
1603-
border-top-right-radius: 0;
1604-
}
1605-
1606-
.ui.label.scope-middle {
1607-
border-radius: 0;
1608-
margin-left: 0;
1609-
}
1610-
1611-
.ui.label.scope-right {
1612-
border-bottom-left-radius: 0;
1613-
border-top-left-radius: 0;
1614-
}
1615-
16161558
.repo-button-row {
16171559
margin: 8px 0;
16181560
display: flex;

0 commit comments

Comments
 (0)