-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Improve labels-list rendering
#34846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 34 commits
64bf916
dff919f
41f37c1
b616c25
5c3e8ba
5902393
e470d00
d9c97d9
039cdfe
3bd9cbd
7094383
a2a60c6
d7b255a
5394119
5a4841a
4162213
46a6987
f74c643
a7ddce1
1466310
b890ad0
ef76480
f8836e2
16b5f3e
7f2be67
b918300
2efd951
4085d02
0f28bc3
4adf1e3
760e23b
8bedfb6
eb2a642
43e7745
0f1ea9a
15cf513
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,25 +4,19 @@ | |
| .ui.label { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: .25rem; | ||
| gap: var(--gap-label); | ||
| min-width: 0; | ||
| vertical-align: middle; | ||
| line-height: 1; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line-height removal causes a unintended enlargement of the labels in the issue comment header: Before:
After:
I'm not sure what the right fix is. Eiter restore There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix various problems #35012 |
||
| max-width: 100%; | ||
| background: var(--color-label-bg); | ||
| color: var(--color-label-text); | ||
| padding: 0.3em 0.5em; | ||
| font-size: 0.85714286rem; | ||
| padding: 2px 6px; | ||
| font-size: var(--font-size-label); | ||
| font-weight: var(--font-weight-medium); | ||
| border: 0 solid transparent; | ||
| border-radius: 0.28571429rem; | ||
| border-radius: var(--border-radius); | ||
| white-space: nowrap; | ||
| } | ||
|
|
||
| .ui.label:first-child { | ||
| margin-left: 0; | ||
| } | ||
| .ui.label:last-child { | ||
| margin-right: 0; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| } | ||
|
|
||
| a.ui.label { | ||
|
|
@@ -292,3 +286,58 @@ a.ui.ui.ui.basic.grey.label:hover { | |
| .ui.large.label { | ||
| font-size: 1rem; | ||
| } | ||
|
|
||
| /* To let labels break up and wrap across multiple lines (issue title, comment event), use "display: contents here" to apply parent layout. | ||
| If the labels-list itself needs some layouts, use extra classes or "tw" helpers. */ | ||
| .labels-list { | ||
| display: contents; | ||
| font-size: var(--font-size-label); /* it must match the label font size, otherwise the height mismatches */ | ||
| } | ||
|
|
||
| .labels-list a { | ||
| max-width: 100%; /* for ellipsis */ | ||
| } | ||
|
|
||
| .labels-list .ui.label { | ||
| min-height: 20px; | ||
| padding-top: 0; | ||
| padding-bottom: 0; | ||
| } | ||
|
|
||
| .with-labels-list-inline .labels-list .ui.label + .ui.label { | ||
| margin-left: var(--gap-label); | ||
| } | ||
|
|
||
| .with-labels-list-inline .labels-list .ui.label { | ||
| line-height: var(--line-height-default); | ||
| } | ||
|
|
||
| /* Scoped labels with different colors on left and right */ | ||
| .ui.label.scope-parent { | ||
| background: none !important; | ||
| padding: 0 !important; | ||
| gap: 0 !important; | ||
| } | ||
|
|
||
| .ui.label.scope-parent > .ui.label { | ||
| margin: 0 !important; /* scoped label's margin is handled by the parent */ | ||
| } | ||
|
|
||
| .ui.label.scope-left { | ||
| border-bottom-right-radius: 0; | ||
| border-top-right-radius: 0; | ||
| } | ||
|
|
||
| .ui.label.scope-middle { | ||
| border-radius: 0; | ||
| } | ||
|
|
||
| .ui.label.scope-right { | ||
| border-bottom-left-radius: 0; | ||
| border-top-left-radius: 0; | ||
| } | ||
|
|
||
| .ui.label.archived-label { | ||
| filter: grayscale(0.5); | ||
| opacity: 0.5; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,6 @@ | |
| list-style-type: none; | ||
| margin: 1em 0; | ||
| padding: 0; | ||
| font-size: 1em; | ||
| } | ||
|
|
||
| .ui.list:first-child { | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.