aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2025-03-17 22:11:24 +0800
committerGitHub <noreply@github.com>2025-03-17 22:11:24 +0800
commit9d89dfe1425ac202e8b1d74ac28c5ed31b766fbd (patch)
tree65fffdc78175ff83926399c8313dce9a6982125e
parent9ebae4a2aaca760bb2859d62d58b0633edb41db1 (diff)
downloadgitea-9d89dfe1425ac202e8b1d74ac28c5ed31b766fbd.tar.gz
gitea-9d89dfe1425ac202e8b1d74ac28c5ed31b766fbd.zip
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
-rw-r--r--templates/package/content/container.tmpl2
-rw-r--r--templates/repo/issue/labels/label_list.tmpl12
-rw-r--r--templates/repo/issue/sidebar/reference_link.tmpl10
-rw-r--r--templates/user/settings/repos.tmpl2
-rw-r--r--web_src/css/modules/grid.css22
-rw-r--r--web_src/css/modules/table.css10
-rw-r--r--web_src/fomantic/build/components/form.css10
-rw-r--r--web_src/fomantic/build/components/modal.css9
8 files changed, 13 insertions, 64 deletions
diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl
index a88ebec3bc..7d89f8c6e2 100644
--- a/templates/package/content/container.tmpl
+++ b/templates/package/content/container.tmpl
@@ -82,7 +82,7 @@
<tbody>
{{range $key, $value := .PackageDescriptor.Metadata.Labels}}
<tr>
- <td class="top aligned">{{$key}}</td>
+ <td class="tw-align-top">{{$key}}</td>
<td class="tw-break-anywhere">{{$value}}</td>
</tr>
{{end}}
diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl
index 822567301e..cdbcc456f0 100644
--- a/templates/repo/issue/labels/label_list.tmpl
+++ b/templates/repo/issue/labels/label_list.tmpl
@@ -63,13 +63,11 @@
{{if and (not .PageIsOrgSettingsLabels) (.OrgLabels)}}
<li class="item">
- <div class="ui grid middle aligned">
- <div class="ten wide column">
- {{ctx.Locale.Tr "repo.org_labels_desc"}}
- {{if .IsOrganizationOwner}}
- <a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>:
- {{end}}
- </div>
+ <div>{{/* parent is flex, so use block here to keep sentence spaces */}}
+ {{ctx.Locale.Tr "repo.org_labels_desc"}}
+ {{if .IsOrganizationOwner}}
+ <a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>:
+ {{end}}
</div>
</li>
diff --git a/templates/repo/issue/sidebar/reference_link.tmpl b/templates/repo/issue/sidebar/reference_link.tmpl
index 6b8f120c7b..ad7c0f6bc0 100644
--- a/templates/repo/issue/sidebar/reference_link.tmpl
+++ b/templates/repo/issue/sidebar/reference_link.tmpl
@@ -1,8 +1,6 @@
<div class="divider"></div>
-<div class="ui equal width compact grid">
- {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
- <div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}">
- <span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
- <button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
- </div>
+{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
+<div class="flex-text-block" data-tooltip-content="{{$issueReferenceLink}}">
+ <span class="tw-flex-1 gt-ellipsis">{{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>
</div>
diff --git a/templates/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl
index a50fb586c7..4aed8070de 100644
--- a/templates/user/settings/repos.tmpl
+++ b/templates/user/settings/repos.tmpl
@@ -81,7 +81,7 @@
{{end}}
{{else}}
{{if .Repos}}
- <div class="ui middle aligned divided list">
+ <div class="ui list">
{{range .Repos}}
<div class="item">
<div class="content flex-text-block">
diff --git a/web_src/css/modules/grid.css b/web_src/css/modules/grid.css
index 05e28c513f..b4f4e16105 100644
--- a/web_src/css/modules/grid.css
+++ b/web_src/css/modules/grid.css
@@ -393,28 +393,6 @@
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) {
.ui[class*="mobile reversed"].grid,
.ui[class*="mobile reversed"].grid > .row,
diff --git a/web_src/css/modules/table.css b/web_src/css/modules/table.css
index 844675b5ae..eabca31a17 100644
--- a/web_src/css/modules/table.css
+++ b/web_src/css/modules/table.css
@@ -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 td.collapsing {
width: 1px;
diff --git a/web_src/fomantic/build/components/form.css b/web_src/fomantic/build/components/form.css
index 66ccedf29a..0124e2d6b5 100644
--- a/web_src/fomantic/build/components/form.css
+++ b/web_src/fomantic/build/components/form.css
@@ -1500,16 +1500,6 @@
}
/*--------------------
- Equal Width
----------------------*/
-
-.ui[class*="equal width"].form .fields > .field,
-.ui.form [class*="equal width"].fields > .field {
- width: 100%;
- flex: 1 1 auto;
-}
-
-/*--------------------
Inline Fields
---------------------*/
diff --git a/web_src/fomantic/build/components/modal.css b/web_src/fomantic/build/components/modal.css
index 87a7989510..7da015cfd0 100644
--- a/web_src/fomantic/build/components/modal.css
+++ b/web_src/fomantic/build/components/modal.css
@@ -116,12 +116,7 @@
align-self: start;
max-width: 100%;
}
-.ui.modal > [class*="top aligned"] {
- align-self: start;
-}
-.ui.modal > [class*="middle aligned"] {
- align-self: center;
-}
+
.ui.modal > [class*="stretched"] {
align-self: stretch;
}
@@ -258,7 +253,7 @@
padding: 1rem 0 !important;
box-shadow: none;
}
-
+
/* Let Buttons Stack */
.ui.modal > .actions {
padding: 1rem 1rem 0rem !important;