1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-10 03:28:20 +00:00

Fix some UI alignments (#25277) (#25290)

Backport #25277 by @wxiaoguang

Fixes: https://github.com/go-gitea/gitea/issues/25282

Fix the problems:

1. The `repo-button-row` had various patches before, this PR makes it
consistent
2. The "Add File" has wrong CSS class "icon", remove it
3. The "Add File" padding was overridden by "!important", fix it by
`.repo-button-row .button.dropdown` with comment
4. The selector `.ui.segments ~ .ui.top.attached.header` is incorrect,
it should use `+`

The `repo-button-row` is only used on 3 pages:


![image](https://github.com/go-gitea/gitea/assets/2114189/16057ff0-7d30-41ca-ac13-70d074364566)


![image](https://github.com/go-gitea/gitea/assets/2114189/cbe2acb1-07b6-48f3-9f28-407a75f8c4ed)


![image](https://github.com/go-gitea/gitea/assets/2114189/341416b3-f6a8-466f-a140-361ee80e53a7)


![image](https://github.com/go-gitea/gitea/assets/2114189/3d4b7857-ef99-4a3f-a667-9890714a096d)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2023-06-15 20:32:59 -04:00
committed by GitHub
parent 3f75fbf8fe
commit 783f7ccb2c
5 changed files with 18 additions and 21 deletions

View File

@@ -2099,8 +2099,8 @@ a.ui.basic.label:hover {
}
/* if a .top.attached.header is followed by a .segment, add some margin */
.ui.segments ~ .ui.top.attached.header,
.ui.attached.segment ~ .ui.top.attached.header {
.ui.segments + .ui.top.attached.header,
.ui.attached.segment + .ui.top.attached.header {
margin-top: 1rem;
}

View File

@@ -2693,19 +2693,12 @@
}
.repo-button-row {
margin-bottom: 10px;
}
.repo-button-row > * {
margin-top: 8px;
}
.wiki .repo-button-row {
margin-bottom: 0;
}
.wiki .repo-button-row > * {
margin-top: 0;
margin: 10px 0;
display: flex;
align-items: center;
gap: 0.5em;
flex-wrap: wrap;
justify-content: space-between;
}
.repo-button-row .button {
@@ -2713,6 +2706,10 @@
height: 30px;
}
.repo-button-row .button.dropdown {
padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */
}
.repo-button-row input {
height: 30px;
}