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}})
<div class="ui right">
<div class="ui top right pointing dropdown">
<button class="ui button primary">
<button class="ui primary tiny button">
{{.locale.Tr "actions.runners.new"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</button>

View file

@ -2493,6 +2493,12 @@ a.ui.basic.label:hover {
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 */
.ui.attached.header .right:not(.dropdown) {
position: absolute;