PageExplorer.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. $c-page-explorer-bg-active: theme('colors.black-50');
  2. $c-page-explorer-easing: cubic-bezier(0.075, 0.82, 0.165, 1);
  3. $menu-footer-height: 50px;
  4. @use 'sass:map';
  5. @import 'PageExplorerItem';
  6. .c-page-explorer {
  7. @apply w-bg-surface-menu-item-active;
  8. max-width: 485px;
  9. width: 100vw;
  10. height: 100vh;
  11. overflow: hidden;
  12. flex: 1;
  13. *:focus {
  14. @include show-focus-outline-inside;
  15. }
  16. @include media-breakpoint-up(sm) {
  17. width: 485px;
  18. box-shadow: 2px 2px 5px $c-page-explorer-bg-active;
  19. }
  20. }
  21. .c-page-explorer > .c-transition-group {
  22. display: flex;
  23. flex-direction: column;
  24. height: 100%;
  25. z-index: 350;
  26. }
  27. .c-page-explorer__drawer {
  28. flex: 1;
  29. overflow-y: auto;
  30. -webkit-overflow-scrolling: touch;
  31. }
  32. $explorer-header-horizontal-padding: 10px;
  33. .c-page-explorer__header {
  34. @apply w-bg-surface-menu-item-active w-text-text-label-menus-default w-border-b w-border-surface-menu-item-active;
  35. display: grid;
  36. grid-template-columns: 1fr auto;
  37. align-items: center;
  38. margin-inline-start: $mobile-nav-indent;
  39. height: $mobile-nav-indent;
  40. @include media-breakpoint-up(sm) {
  41. margin-inline-start: initial;
  42. height: initial;
  43. }
  44. }
  45. .c-page-explorer__header__title {
  46. @apply hover:w-bg-surface-menus hover:w-text-text-label-menus-active focus:w-bg-surface-menus focus:w-text-text-label-menus-active;
  47. color: inherit;
  48. }
  49. .c-page-explorer__header__title__inner {
  50. @apply w-flex;
  51. padding: 1em $explorer-header-horizontal-padding;
  52. overflow: hidden;
  53. text-overflow: ellipsis;
  54. white-space: nowrap;
  55. .icon {
  56. @apply w-text-text-label-menus-default;
  57. margin-inline-end: 0.25rem;
  58. font-size: 1rem;
  59. }
  60. .icon--explorer-header {
  61. @apply w-text-text-label-menus-default w-mr-2;
  62. width: 1.25em;
  63. height: 1.25em;
  64. margin-inline-end: 0.25rem;
  65. vertical-align: text-top;
  66. }
  67. @include media-breakpoint-up(sm) {
  68. padding: 1em 1.5em;
  69. }
  70. }
  71. .c-page-explorer__header__select {
  72. @apply w-text-text-label-menus-default w-bg-surface-menus;
  73. $margin: 10px;
  74. margin-inline-end: $margin;
  75. > select {
  76. padding: 5px 30px 5px 10px;
  77. font-size: 0.875rem;
  78. &:disabled {
  79. border: 0;
  80. }
  81. &:hover:enabled {
  82. cursor: pointer;
  83. }
  84. &:hover:disabled {
  85. color: inherit;
  86. background-color: inherit;
  87. cursor: inherit;
  88. }
  89. }
  90. // Add select arrow back on browsers where native ui has been removed
  91. &-icon {
  92. @apply w-text-icon-primary;
  93. position: absolute;
  94. inset-inline-end: 1rem;
  95. top: 0.85rem;
  96. width: 1.25rem;
  97. height: 1.25rem;
  98. pointer-events: none;
  99. .ie & {
  100. display: none;
  101. }
  102. }
  103. }
  104. .c-page-explorer__placeholder {
  105. padding: 1em;
  106. color: theme('colors.text-label-menus-default');
  107. @include media-breakpoint-up(sm) {
  108. padding: 1em 1.75em;
  109. }
  110. }
  111. .c-page-explorer__see-more {
  112. display: block;
  113. padding: 1em;
  114. background: theme('colors.black-35');
  115. color: theme('colors.text-label-menus-default');
  116. &:focus {
  117. color: theme('colors.text-label-menus-active');
  118. background: $c-page-explorer-bg-active;
  119. }
  120. // Overrides for default link hover.
  121. &:hover {
  122. color: theme('colors.text-label-menus-active');
  123. }
  124. @include hover {
  125. background: $c-page-explorer-bg-active;
  126. }
  127. @include media-breakpoint-up(sm) {
  128. padding: 1em 1.75em;
  129. height: $menu-footer-height;
  130. }
  131. }