index.module.scss 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @use "../theme";
  2. .singleToggleGroup {
  3. gap: theme.spacing(2);
  4. @include theme.row;
  5. .toggleButton {
  6. position: relative;
  7. .bubble {
  8. position: absolute;
  9. inset: 0;
  10. border-radius: theme.button-border-radius("sm");
  11. background-color: theme.color("button", "solid", "background", "normal");
  12. outline: 4px solid transparent;
  13. outline-offset: 0;
  14. z-index: -1;
  15. transition-property: background-color, outline-color;
  16. transition-duration: 100ms;
  17. transition-timing-function: linear;
  18. }
  19. &[data-rounded] {
  20. border-radius: theme.border-radius("full");
  21. .bubble {
  22. border-radius: theme.border-radius("full");
  23. }
  24. }
  25. &[data-selected] {
  26. color: theme.color("button", "solid", "foreground");
  27. pointer-events: none;
  28. &[data-selectable] {
  29. pointer-events: auto;
  30. -webkit-tap-highlight-color: transparent;
  31. &[data-hovered] .bubble {
  32. background-color: theme.color(
  33. "button",
  34. "solid",
  35. "background",
  36. "hover"
  37. );
  38. }
  39. &[data-pressed] .bubble {
  40. background-color: theme.color(
  41. "button",
  42. "solid",
  43. "background",
  44. "active"
  45. );
  46. }
  47. }
  48. }
  49. }
  50. }