Remove unused or abused styles (#33918)

* `top aligned` => `tw-align-top`
* label list: it was broken, this PR fixes it
* reference link: simplified
* settings/repos: not affected
This commit is contained in:
wxiaoguang 2025-03-17 22:11:24 +08:00 committed by GitHub
parent 9ebae4a2aa
commit 9d89dfe142
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 64 deletions

View File

@ -82,7 +82,7 @@
<tbody> <tbody>
{{range $key, $value := .PackageDescriptor.Metadata.Labels}} {{range $key, $value := .PackageDescriptor.Metadata.Labels}}
<tr> <tr>
<td class="top aligned">{{$key}}</td> <td class="tw-align-top">{{$key}}</td>
<td class="tw-break-anywhere">{{$value}}</td> <td class="tw-break-anywhere">{{$value}}</td>
</tr> </tr>
{{end}} {{end}}

View File

@ -63,13 +63,11 @@
{{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}} {{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}}
<li class="item"> <li class="item">
<div class="ui grid middle aligned"> <div>{{/* parent is flex, so use block here to keep sentence spaces */}}
<div class="ten wide column"> {{ctx.Locale.Tr "repo.org_labels_desc"}}
{{ctx.Locale.Tr "repo.org_labels_desc"}} {{if .IsOrganizationOwner}}
{{if .IsOrganizationOwner}} <a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>:
<a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>: {{end}}
{{end}}
</div>
</div> </div>
</li> </li>

View File

@ -1,8 +1,6 @@
<div class="divider"></div> <div class="divider"></div>
<div class="ui equal width compact grid"> {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} <div class="flex-text-block" data-tooltip-content="{{$issueReferenceLink}}">
<div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}"> <span class="tw-flex-1 gt-ellipsis">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
<span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> <button class="ui compact tiny icon button" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
<button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
</div>
</div> </div>

View File

@ -81,7 +81,7 @@
{{end}} {{end}}
{{else}} {{else}}
{{if .Repos}} {{if .Repos}}
<div class="ui middle aligned divided list"> <div class="ui list">
{{range .Repos}} {{range .Repos}}
<div class="item"> <div class="item">
<div class="content flex-text-block"> <div class="content flex-text-block">

View File

@ -393,28 +393,6 @@
margin-right: 2.5rem; margin-right: 2.5rem;
} }
.ui[class*="middle aligned"].grid > .column:not(.row),
.ui[class*="middle aligned"].grid > .row > .column,
.ui.grid > [class*="middle aligned"].row > .column,
.ui.grid > [class*="middle aligned"].column:not(.row),
.ui.grid > .row > [class*="middle aligned"].column {
flex-direction: column;
vertical-align: middle;
align-self: center !important;
}
.ui[class*="equal width"].grid > .column:not(.row),
.ui[class*="equal width"].grid > .row > .column,
.ui.grid > [class*="equal width"].row > .column {
display: inline-block;
flex-grow: 1;
}
.ui[class*="equal width"].grid > .wide.column,
.ui[class*="equal width"].grid > .row > .wide.column,
.ui.grid > [class*="equal width"].row > .wide.column {
flex-grow: 0;
}
@media only screen and (max-width: 767.98px) { @media only screen and (max-width: 767.98px) {
.ui[class*="mobile reversed"].grid, .ui[class*="mobile reversed"].grid,
.ui[class*="mobile reversed"].grid > .row, .ui[class*="mobile reversed"].grid > .row,

View File

@ -152,16 +152,6 @@
} }
} }
.ui.table[class*="top aligned"],
.ui.table [class*="top aligned"] {
vertical-align: top;
}
.ui.table[class*="middle aligned"],
.ui.table [class*="middle aligned"] {
vertical-align: middle;
}
.ui.table th.collapsing, .ui.table th.collapsing,
.ui.table td.collapsing { .ui.table td.collapsing {
width: 1px; width: 1px;

View File

@ -1499,16 +1499,6 @@
width: 100%; width: 100%;
} }
/*--------------------
Equal Width
---------------------*/
.ui[class*="equal width"].form .fields > .field,
.ui.form [class*="equal width"].fields > .field {
width: 100%;
flex: 1 1 auto;
}
/*-------------------- /*--------------------
Inline Fields Inline Fields
---------------------*/ ---------------------*/

View File

@ -116,12 +116,7 @@
align-self: start; align-self: start;
max-width: 100%; max-width: 100%;
} }
.ui.modal > [class*="top aligned"] {
align-self: start;
}
.ui.modal > [class*="middle aligned"] {
align-self: center;
}
.ui.modal > [class*="stretched"] { .ui.modal > [class*="stretched"] {
align-self: stretch; align-self: stretch;
} }