From a3546369661bf4073ae748a501840fbd05fef02b Mon Sep 17 00:00:00 2001 From: Jason Song Date: Sun, 12 Feb 2023 19:19:50 +0800 Subject: [PATCH] Fix style of actions rerun button (#22835) Authored by @a1012112796 at https://github.com/go-gitea/gitea/pull/22798#issuecomment-1421820001 Avoid putting `button` in `a`. A patch for #22798 . Now it looks like: image image --------- Co-authored-by: silverwind Co-authored-by: Lunny Xiao --- web_src/js/components/RepoActionView.vue | 48 +++++++++++++++--------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue index 703fe59d81..ddc7139a2e 100644 --- a/web_src/js/components/RepoActionView.vue +++ b/web_src/js/components/RepoActionView.vue @@ -12,19 +12,20 @@ @@ -291,7 +292,7 @@ export function initRepositoryActionView() { .action-view-header { margin: 0 20px 20px 20px; - button.run_cancel { + .run_cancel { border: none; color: var(--color-red); background-color: transparent; @@ -299,7 +300,7 @@ export function initRepositoryActionView() { cursor: pointer; transition:transform 0.2s; }; - button.run_cancel:hover{ + .run_cancel:hover{ transform:scale(130%); }; } @@ -327,14 +328,16 @@ export function initRepositoryActionView() { } .job-brief-list { - a.job-brief-item { - display: block; + .job-brief-item { margin: 5px 0; padding: 10px; background: var(--color-info-bg); border-radius: 5px; text-decoration: none; - button.job-brief-rerun { + display: flex; + justify-items: center; + flex-wrap: nowrap; + .job-brief-rerun { float: right; border: none; background-color: transparent; @@ -342,11 +345,20 @@ export function initRepositoryActionView() { cursor: pointer; transition:transform 0.2s; }; - button.job-brief-rerun:hover{ + .job-brief-rerun:hover{ transform:scale(130%); }; + .job-brief-link { + flex-grow: 1; + display: flex; + span { + margin-right: 8px; + display: flex; + align-items: center; + } + } } - a.job-brief-item:hover { + .job-brief-item:hover { background-color: var(--color-secondary); } }