Toggle.scss 925 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .toggleContainer {
  2. &:not(.disabled-true):hover .toggle {
  3. background: var(--quaternaryColor);
  4. }
  5. &.disabled-true {
  6. opacity: 0.5;
  7. .toggle {
  8. cursor: not-allowed;
  9. }
  10. }
  11. .desc {
  12. color: var(--secondaryTextColor);
  13. font-style: italic;
  14. }
  15. p {
  16. margin-bottom: 0.5em;
  17. color: var(--secondaryTextColor);
  18. }
  19. .toggle {
  20. position: relative;
  21. cursor: pointer;
  22. height: 1em;
  23. width: 2em;
  24. background: var(--tertiaryColor);
  25. border-radius: 5px;
  26. transition: background 100ms ease-in-out;
  27. &.active-true .ball {
  28. transform: translateX(100%);
  29. background: var(--accentColor);
  30. }
  31. .ball {
  32. display: inline-block;
  33. height: 1em;
  34. width: 1em;
  35. background: var(--senaryColor);
  36. border-radius: 5px;
  37. transform: translateX(0);
  38. transition: 100ms ease-in-out;
  39. transition-property: transform, background;
  40. }
  41. }
  42. }