From dc4a6ede25ef5b180ccb6107b21128757c0cf0fc Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Fri, 22 Oct 2021 13:26:09 +0100 Subject: [PATCH] Move help link to left, restyle it, decrease spacing between components, shrink header a touch --- .../main/resources/lib/form/helpLink.jelly | 9 +-- war/src/main/less/base/style.less | 58 ++++++++++++++++++- war/src/main/less/modules/app-bar.less | 11 ++-- war/src/main/less/modules/form.less | 18 ++++-- 4 files changed, 77 insertions(+), 19 deletions(-) diff --git a/core/src/main/resources/lib/form/helpLink.jelly b/core/src/main/resources/lib/form/helpLink.jelly index af1a1a7eafc3..2bc8075b4e34 100644 --- a/core/src/main/resources/lib/form/helpLink.jelly +++ b/core/src/main/resources/lib/form/helpLink.jelly @@ -54,12 +54,9 @@ THE SOFTWARE. - - - + + ? + - - - diff --git a/war/src/main/less/base/style.less b/war/src/main/less/base/style.less index dd54dce5fbde..85d867929fdf 100644 --- a/war/src/main/less/base/style.less +++ b/war/src/main/less/base/style.less @@ -654,11 +654,65 @@ label.attach-previous { } .help-button { - margin-left: 2px; - margin-right: 2ch; + position: relative; + width: 18px; + height: 18px; + margin-left: 1ch; display: inline-flex; justify-content: center; align-items: center; + color: var(--text-color)!important; + line-height: 18px; + border-radius: 100%; + + &::before { + content: "?"; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: var(--text-color); + opacity: 0.1; + border-radius: inherit; + transition: 0.2s ease; + } + + &::after { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + box-shadow: 0 0 0 10px transparent; + border-radius: inherit; + opacity: 0.1; + transition: 0.2s ease; + } + + &:hover { + text-decoration: none; + + &::before { + opacity: 0.2; + } + } + + &:active { + &::before { + opacity: 0.3; + } + + &::after { + box-shadow: 0 0 0 5px var(--text-color); + } + } + + &:active, &:focus { + outline: none; + text-decoration: none; + } } .setting-help .help-button { diff --git a/war/src/main/less/modules/app-bar.less b/war/src/main/less/modules/app-bar.less index 6b93dc66be1a..e8b6c3442949 100644 --- a/war/src/main/less/modules/app-bar.less +++ b/war/src/main/less/modules/app-bar.less @@ -3,8 +3,6 @@ align-items: center; justify-content: space-between; margin-bottom: 2rem; - padding-bottom: 2rem; - border-bottom: 2px solid var(--panel-border-color); .jenkins-app-bar__content { display: flex; @@ -20,13 +18,14 @@ margin-left: 2rem; } - &--no-border { - border-bottom: none; - margin-bottom: 0; + &--border { + margin-bottom: 2rem; + padding-bottom: 2rem; + border-bottom: 2px solid var(--panel-border-color); } h1 { margin: 0; - font-size: 1.8rem; + font-size: 1.7rem; } } diff --git a/war/src/main/less/modules/form.less b/war/src/main/less/modules/form.less index 0a464d061f03..65692fdfe9e1 100644 --- a/war/src/main/less/modules/form.less +++ b/war/src/main/less/modules/form.less @@ -1,9 +1,17 @@ .jenkins-form { - max-width: 80ch; } .jenkins-form-item { - margin-bottom: 2rem; + max-width: 600px; + margin-bottom: 1.75rem; + + &--small { + max-width: 300px; + } + + &--medium { + max-width: 450px; + } } .jenkins-fieldset { @@ -17,7 +25,8 @@ } .jenkins-form-label { - display: block; + display: flex; + align-items: center; font-weight: bold; margin-top: 0; margin-bottom: 0.75rem; @@ -38,7 +47,7 @@ border: 2px solid var(--input-border); padding: 8px; border-radius: 6px; - width: 350px; + width: 100%; box-shadow: 0 0 0 10px transparent; transition: 0.2s ease; @@ -170,7 +179,6 @@ } .jenkins-radio { - max-width: 60ch; margin-top: 2px; &:not(:last-of-type) {