_DirectionalPad.scss 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @mixin directionalPad() {
  2. .esri-directional-pad {
  3. display: flex;
  4. flex-direction: column;
  5. gap: $side-spacing--half;
  6. outline: none;
  7. /* Two calcite-pads provide their own background and shadow */
  8. box-shadow: none !important;
  9. background: transparent;
  10. /* Prevent selecting the SVGs (ios webkit) */
  11. user-select: none;
  12. calcite-action-pad {
  13. display: contents;
  14. }
  15. calcite-action-group {
  16. /* Prevent browser's zoom/pan gestures (ios/android) */
  17. touch-action: none;
  18. }
  19. calcite-action {
  20. /* Fix Calcite's padding inline not matching padding block */
  21. aspect-ratio: 1;
  22. }
  23. &__buttons-container {
  24. --calcite-color-background: transparent;
  25. --calcite-action-group-gap: 0;
  26. --calcite-action-group-padding: 0;
  27. calcite-action {
  28. /* Make focus outline not visible if using mouse */
  29. --calcite-color-focus-color: var(--calcite-color-foreground-3);
  30. }
  31. calcite-action:not([active]) {
  32. /* Fix active styles remaining on initial button in Firefox */
  33. --calcite-color-foreground-3: var(--calcite-color-foreground-1);
  34. }
  35. calcite-action[active] {
  36. /* Fix button:active not having a background */
  37. --calcite-color-foreground-1: var(--calcite-color-foreground-3);
  38. }
  39. calcite-icon {
  40. transform: var(--rotation, unset);
  41. }
  42. /* Fix sticky hover effect on touchscreen devices */
  43. @media (hover: none) {
  44. calcite-action {
  45. --calcite-color-foreground-2: var(--calcite-color-foreground-1);
  46. --calcite-color-text-1: var(--calcite-color-text-3);
  47. }
  48. }
  49. }
  50. &__rotation-container {
  51. display: block;
  52. width: 100%;
  53. calcite-action {
  54. flex: 0.3;
  55. }
  56. }
  57. &__rotation-slider-container {
  58. display: flex;
  59. flex: 1;
  60. align-items: center;
  61. calcite-slider {
  62. flex: 1;
  63. /*
  64. * Fix the slider label overflowing the slider bounds when slider value
  65. * is at either edge
  66. */
  67. padding-inline: $side-spacing--third;
  68. }
  69. }
  70. }
  71. }
  72. @if $include_DirectionalPad == true {
  73. @include directionalPad();
  74. }