From ecd17cdf99784d8d4a904f938e9e190298e4a9cb Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Tue, 28 Dec 2021 14:09:04 +0000 Subject: [PATCH] Add disabled states for checkboxes, reduce margin if no label --- war/src/main/less/modules/form.less | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/war/src/main/less/modules/form.less b/war/src/main/less/modules/form.less index 80d578c6366a..1f362b7a8a0c 100644 --- a/war/src/main/less/modules/form.less +++ b/war/src/main/less/modules/form.less @@ -434,6 +434,17 @@ &:checked + label:after { transform: scale(1)!important; } + + &:disabled { + & + label { + cursor: default; + pointer-events: none; + + &::before { + opacity: 0.3 !important; + } + } + } } .jenkins-checkbox label { @@ -491,6 +502,12 @@ box-shadow: 0 0 0 5px var(--focus-input-glow); } } + + &:empty { + &::before { + margin-right: 0; + } + } } .jenkins-checkbox__description {