Fix runner button height (#24338)

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

Set size class and downsize any such buttons that have a dropdown icon
because the dropdown icon increases button height artificially.

[`:has()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:has) is not
supported in Firefox yet, but works fine with the experimental pref
enabled. I see this as a graceful degradation in unsupporting browsers.
This commit is contained in:
silverwind 2023-04-26 06:09:29 +02:00 committed by GitHub
parent f2f0fb43e0
commit 75e35fb03a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,7 @@
{{.locale.Tr "actions.runners.runner_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) {{.locale.Tr "actions.runners.runner_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<div class="ui top right pointing dropdown"> <div class="ui top right pointing dropdown">
<button class="ui button primary"> <button class="ui primary tiny button">
{{.locale.Tr "actions.runners.new"}} {{.locale.Tr "actions.runners.new"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
</button> </button>

View File

@ -2493,6 +2493,12 @@ a.ui.basic.label:hover {
font-weight: normal; font-weight: normal;
} }
/* reduce height of buttons with dropdown icon */
.ui.attached.header .right .button:has(.dropdown.icon) {
padding-top: 7px;
padding-bottom: 7px;
}
/* fix misaligned right buttons on box headers */ /* fix misaligned right buttons on box headers */
.ui.attached.header .right:not(.dropdown) { .ui.attached.header .right:not(.dropdown) {
position: absolute; position: absolute;