Skip to content

Commit

Permalink
Cleanup toggle switch
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Dec 29, 2021
1 parent f31ec79 commit b569503
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions war/src/main/less/form/toggle-switch.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@

&:checked + label::after {
left: 25px;
color: var(--focus-input-border);
transform: rotate(0deg);
mask-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='66px' height='66px' viewBox='0 0 66 66' version='1.1' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M66,0 L66,66 L0,66 L0,0 L66,0 Z M37.7154094,29.2061836 C37.3690459,28.9031155 36.8425777,28.9382134 36.5395097,29.2845769 L36.5395097,29.2845769 L31.2924962,35.2799905 L29.4225874,33.410737 L29.3440813,33.3414133 C29.0171724,33.0872262 28.5444804,33.1103341 28.2440774,33.410737 C27.9186409,33.7361736 27.9186409,34.2638104 28.2440774,34.589247 L28.2440774,34.589247 L30.7440745,37.0892441 L30.8202748,37.15679 C31.1634387,37.4256962 31.6657159,37.3856111 31.9604761,37.0487424 L31.9604761,37.0487424 L37.7938027,30.3820833 L37.8577508,30.2991398 C38.0896293,29.9560466 38.0351295,29.4859387 37.7154094,29.2061836 Z' fill='%23000000'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}

&:active + label::before,
&:focus + label::before {
box-shadow: 0 0 0 5px var(--focus-input-glow);
}

&:disabled {
& + label {
cursor: not-allowed;
}
}
}

.jenkins-toggle-switch label {
Expand All @@ -58,7 +64,7 @@
}

&::after {
content: "";
content: "";
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -68,13 +74,11 @@
width: 20px;
height: 20px;
background: var(--background);
border-radius: 19px;
color: transparent;
transition: 0.2s ease;
mask-size: 60px 60px;
mask-position: center;
border-radius: 100%;
transition: var(--standard-transition);
transform: rotate(-90deg);
font-size: 12px;
font-weight: bold;
padding-top: 2px;
box-shadow: -1px 0 0 rgba(0, 0, 0, 0.1);
}

Expand Down

0 comments on commit b569503

Please sign in to comment.