_NavigationToggle.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. $earmark_size: 6px !default;
  2. @mixin navigationToggle() {
  3. .esri-navigation-toggle {
  4. display: flex;
  5. flex-flow: column nowrap;
  6. &:hover,
  7. &:focus {
  8. background-color: $background-color--hover;
  9. .esri-navigation-toggle__button {
  10. color: $interactive-font-color--hover;
  11. }
  12. }
  13. }
  14. .esri-navigation-toggle--horizontal {
  15. flex-flow: row nowrap;
  16. .esri-navigation-toggle__button--rotate {
  17. border-top: none;
  18. border-left: solid 1px $border-color;
  19. }
  20. }
  21. .esri-navigation-toggle__button {
  22. box-shadow: none;
  23. position: relative;
  24. background-color: transparent;
  25. &:before {
  26. @include earmarkStem();
  27. opacity: 0;
  28. border-width: 0 $earmark_size $earmark_size 0;
  29. border-color: transparent $interactive-font-color--hover transparent transparent;
  30. }
  31. &:hover,
  32. &:focus {
  33. background-color: transparent;
  34. }
  35. }
  36. .esri-navigation-toggle__button--rotate {
  37. border-top: solid 1px $border-color;
  38. }
  39. .esri-navigation-toggle__button--pan {
  40. margin-bottom: 0;
  41. }
  42. .esri-navigation-toggle__button--active {
  43. color: $interactive-font-color--hover;
  44. &:before {
  45. opacity: 1;
  46. }
  47. }
  48. .esri-navigation-toggle.esri-disabled {
  49. .esri-navigation-toggle__button {
  50. background-color: $background-color;
  51. color: $interactive-font-color--disabled;
  52. cursor: auto;
  53. &:before {
  54. opacity: 0;
  55. }
  56. }
  57. }
  58. [dir="rtl"] {
  59. .esri-navigation-toggle--horizontal {
  60. .esri-navigation-toggle__button--rotate {
  61. border-left: none;
  62. border-right: solid 1px $border-color;
  63. }
  64. }
  65. .esri-navigation-toggle__button {
  66. &:before {
  67. border-width: $earmark_size $earmark_size 0 0;
  68. border-color: $interactive-font-color--hover transparent transparent transparent;
  69. right: auto;
  70. left: 1px;
  71. }
  72. }
  73. }
  74. }
  75. @mixin earmarkStem() {
  76. position: absolute;
  77. top: 1px;
  78. right: 1px;
  79. z-index: 0;
  80. content: "";
  81. width: 0;
  82. height: 0;
  83. border-style: solid;
  84. transition: opacity 125ms ease-in-out;
  85. }
  86. @if $include_NavigationToggle == true {
  87. @include navigationToggle();
  88. }