Skip to content

Commit

Permalink
EPMRPP-98999 || Background-color change for disabled state (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-hambardzumian authored Jan 24, 2025
1 parent 28c1da7 commit 7d4aa9e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/toggle/toggle.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
border-radius: 10px;
width: 32px;
height: 20px;

&:before {
position: absolute;
top: 2px;
Expand Down Expand Up @@ -68,8 +69,8 @@
outline: none;
}

&:focus:not(.disabled),
&:focus-visible:not(.disabled) + .slider {
&:focus:not(:disabled),
&:focus-visible:not(:disabled) + .slider {
&::after {
top: 50%;
left: 50%;
Expand All @@ -86,12 +87,15 @@
&:checked + .slider {
background-color: var(--rp-ui-base-topaz);
}

&:checked + .slider:before {
transform: translateX(12px);
}
&:hover + .slider {

&:hover:not(:disabled) + .slider {
background-color: var(--rp-ui-base-e-400);
}

&:checked:hover + .slider {
background-color: var(--rp-ui-base-topaz-hover);
}
Expand Down

0 comments on commit 7d4aa9e

Please sign in to comment.