Explorer.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. $c-explorer-bg: #4c4e4d;
  2. $c-explorer-bg-dark: $nav-grey-1;
  3. $c-explorer-bg-active: rgba(0, 0, 0, 0.425);
  4. $c-explorer-secondary: #a5a5a5;
  5. $c-explorer-easing: cubic-bezier(0.075, 0.82, 0.165, 1);
  6. $menu-footer-height: 50px;
  7. @use 'sass:map';
  8. @import 'ExplorerItem';
  9. .explorer__wrapper,
  10. .explorer__wrapper * {
  11. box-sizing: border-box;
  12. }
  13. .explorer__wrapper {
  14. display: flex;
  15. flex: 1;
  16. }
  17. .explorer {
  18. width: 100%;
  19. display: flex;
  20. flex-direction: column;
  21. @include media-breakpoint-up(sm) {
  22. width: 485px;
  23. height: 100vh;
  24. position: fixed;
  25. z-index: 500;
  26. // Remove once we drop support for Safari 13.
  27. // stylelint-disable-next-line property-disallowed-list
  28. left: $menu-width;
  29. inset-inline-start: $menu-width;
  30. }
  31. *:focus {
  32. @include show-focus-outline-inside;
  33. }
  34. }
  35. .c-explorer {
  36. flex: 1;
  37. position: relative;
  38. overflow: hidden;
  39. background: $c-explorer-bg;
  40. @include media-breakpoint-up(sm) {
  41. box-shadow: 2px 2px 5px $c-explorer-bg-active;
  42. }
  43. }
  44. .c-explorer > .c-transition-group {
  45. display: flex;
  46. flex-direction: column;
  47. height: 100%;
  48. z-index: 150;
  49. }
  50. .c-explorer__close {
  51. padding: 1em;
  52. color: $c-explorer-secondary;
  53. border-bottom: 1px solid rgba(200, 200, 200, 0.1);
  54. cursor: pointer;
  55. display: none;
  56. &:focus {
  57. background-color: $c-explorer-bg-active;
  58. color: $color-white;
  59. }
  60. // Overrides for default link hover.
  61. &:hover {
  62. color: $c-explorer-secondary;
  63. }
  64. @include media-breakpoint-down(xs) {
  65. .explorer-open & {
  66. display: block;
  67. }
  68. }
  69. }
  70. .c-explorer__drawer {
  71. flex: 1;
  72. overflow-y: auto;
  73. -webkit-overflow-scrolling: touch;
  74. }
  75. .c-explorer__header {
  76. display: block;
  77. background-color: $c-explorer-bg-dark;
  78. border-bottom: 1px solid $c-explorer-bg-dark;
  79. color: $color-white;
  80. }
  81. .c-explorer__header__title {
  82. color: inherit;
  83. &:focus {
  84. background-color: $c-explorer-bg-active;
  85. color: $color-white;
  86. }
  87. // Overrides for default link hover.
  88. &:hover {
  89. color: $color-white;
  90. }
  91. @include hover {
  92. background-color: $c-explorer-bg-active;
  93. }
  94. }
  95. .c-explorer__header__title__inner {
  96. width: 70%;
  97. float: left;
  98. padding: 1em 0.75em;
  99. overflow: hidden;
  100. text-overflow: ellipsis;
  101. white-space: nowrap;
  102. .icon {
  103. color: $c-explorer-secondary;
  104. margin-inline-end: 0.25rem;
  105. font-size: 1rem;
  106. }
  107. .icon--explorer-header {
  108. width: 1.25em;
  109. height: 1.25em;
  110. margin-inline-end: 0.25rem;
  111. vertical-align: text-top;
  112. color: $c-explorer-secondary;
  113. }
  114. @include media-breakpoint-up(sm) {
  115. padding: 1em 1.5em;
  116. }
  117. }
  118. .c-explorer__header__select {
  119. $margin: 10px;
  120. position: relative;
  121. > select {
  122. width: calc(30% - #{$margin * 2});
  123. height: calc(100% - #{$margin * 2});
  124. margin-top: $margin;
  125. margin-inline-end: $margin;
  126. float: right;
  127. padding: 0;
  128. padding-inline-start: 10px;
  129. background-color: $c-explorer-bg-dark;
  130. border-radius: 0;
  131. border-color: #4c4e4d;
  132. color: $color-white;
  133. &:disabled {
  134. border: 0;
  135. }
  136. &:hover:enabled {
  137. cursor: pointer;
  138. }
  139. &:hover:disabled {
  140. color: inherit;
  141. background-color: inherit;
  142. cursor: inherit;
  143. }
  144. }
  145. // Add select arrow back on browsers where native ui has been removed
  146. &-icon {
  147. position: absolute;
  148. // Remove once we drop support for Safari 13.
  149. // stylelint-disable-next-line property-disallowed-list
  150. right: 1rem;
  151. inset-inline-end: 1rem;
  152. top: 1rem;
  153. width: 1.25rem;
  154. height: 1.25rem;
  155. color: $color-grey-3;
  156. .ie & {
  157. display: none;
  158. }
  159. }
  160. }
  161. .c-explorer__placeholder {
  162. padding: 1em;
  163. color: $color-white;
  164. @include media-breakpoint-up(sm) {
  165. padding: 1em 1.75em;
  166. }
  167. }
  168. .c-explorer__see-more {
  169. display: block;
  170. padding: 1em;
  171. background: rgba(0, 0, 0, 0.3);
  172. color: $color-white;
  173. &:focus {
  174. color: $c-explorer-secondary;
  175. background: $c-explorer-bg-active;
  176. }
  177. // Overrides for default link hover.
  178. &:hover {
  179. color: $color-white;
  180. }
  181. @include hover {
  182. background: $c-explorer-bg-active;
  183. }
  184. @include media-breakpoint-up(sm) {
  185. padding: 1em 1.75em;
  186. height: $menu-footer-height;
  187. }
  188. }