설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_search.scss 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. // Algolia Search Styles
  2. // Variables
  3. $search-width: 600px;
  4. $search-max-height: 32.9375rem;
  5. $search-width-md: 450px;
  6. $search-width-sm: 90%;
  7. // Mixins
  8. @mixin search-responsive-width($width) {
  9. inline-size: $width;
  10. inset-inline-start: calc(50% - calc($width / 2));
  11. }
  12. // Detached Search Button
  13. .aa-DetachedSearchButton {
  14. display: flex;
  15. align-items: center;
  16. border: none;
  17. background: transparent;
  18. gap: 1rem;
  19. .aa-DetachedSearchButtonPlaceholder {
  20. color: var(--#{$prefix}secondary-color);
  21. @include media-breakpoint-down(md) {
  22. display: none;
  23. }
  24. }
  25. }
  26. .aa-InputWrapper {
  27. ::placeholder {
  28. color: var(--#{$prefix}secondary-color);
  29. }
  30. }
  31. .aa-DetachedSearchButtonIcon,
  32. .aa-SubmitButton {
  33. &::before {
  34. display: block;
  35. background-color: currentcolor;
  36. content: "";
  37. margin-block-end: -3px;
  38. mask-image: var(--svg);
  39. mask-repeat: no-repeat;
  40. mask-size: 100% 100%;
  41. --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 18a7.95 7.95 0 0 0 4.897-1.688l4.396 4.396l1.414-1.414l-4.396-4.396A7.95 7.95 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8s3.589 8 8 8m0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6s-6-2.691-6-6s2.691-6 6-6'/%3E%3C/svg%3E");
  42. }
  43. .aa-SubmitIcon {
  44. display: none;
  45. }
  46. }
  47. .aa-DetachedSearchButtonIcon {
  48. &::before {
  49. block-size: 22px;
  50. inline-size: 22px;
  51. }
  52. }
  53. .aa-SubmitButton {
  54. &::before {
  55. block-size: 24px;
  56. inline-size: 24px;
  57. }
  58. }
  59. .aa-DetachedSearchButtonQuery {
  60. display: none;
  61. }
  62. .layout-wrapper:not(.layout-horizontal) .aa-DetachedSearchButtonPlaceholder[hidden] {
  63. display: block !important;
  64. }
  65. /* Search Headings */
  66. .search-headings {
  67. display: block;
  68. color: var(--#{$prefix}secondary-color);
  69. font-size: .75rem;
  70. letter-spacing: .8px;
  71. margin-block: 1rem .5rem;
  72. margin-inline: 0;
  73. padding-block: 0;
  74. padding-inline: 1.25rem;
  75. text-transform: uppercase;
  76. .suggestion-section & {
  77. line-height: 14px;
  78. margin-block: .5rem;
  79. }
  80. }
  81. /* Suggestion Items */
  82. .suggestion-items {
  83. .suggestion-item {
  84. color: var(--#{$prefix}heading-color);
  85. gap: .35rem;
  86. padding-block: .543rem;
  87. padding-inline: 1rem;
  88. text-decoration: none;
  89. transition: all .2s ease;
  90. @include border-radius(var(--#{$prefix}border-radius));
  91. &:hover,
  92. &[aria-selected="true"],
  93. &.suggestion-item-focused {
  94. color: var(--#{$prefix}primary);
  95. }
  96. &:focus,
  97. &:focus-visible {
  98. background-color: var(--#{$prefix}primary-bg-subtle);
  99. color: var(--#{$prefix}primary);
  100. }
  101. }
  102. }
  103. /* Detached Overlay */
  104. .aa-DetachedOverlay {
  105. position: fixed;
  106. z-index: 999999;
  107. backdrop-filter: blur(3px);
  108. background: rgba(0, 0, 0, .35);
  109. block-size: 100vh;
  110. inset-block-start: 0;
  111. inset-inline-end: 0;
  112. inset-inline-start: 0;
  113. .aa-DetachedContainer {
  114. position: fixed;
  115. overflow: hidden;
  116. background: var(--#{$prefix}paper-bg);
  117. box-shadow: var(--#{$prefix}box-shadow-lg);
  118. inset-block-start: 4rem;
  119. max-block-size: $search-max-height;
  120. @include border-radius($border-radius-lg);
  121. @include search-responsive-width($search-width);
  122. @include media-breakpoint-down(md) {
  123. @include search-responsive-width($search-width-md);
  124. }
  125. @include media-breakpoint-down(sm) {
  126. inline-size: $search-width-sm;
  127. inset-inline-start: 50%;
  128. transform: translateX(-50%);
  129. }
  130. }
  131. .search-control {
  132. background: transparent;
  133. inline-size: 100%;
  134. &:focus,
  135. &:focus-visible {
  136. outline: none;
  137. }
  138. &::-webkit-search-cancel-button,
  139. &::-webkit-search-decoration {
  140. display: none;
  141. appearance: none;
  142. }
  143. &::-ms-clear {
  144. display: none;
  145. }
  146. }
  147. .aa-List {
  148. padding-inline: 0;
  149. }
  150. .aa-InputWrapperPrefix {
  151. position: absolute;
  152. }
  153. .aa-SubmitButton {
  154. border: 0;
  155. background: none;
  156. padding-inline-start: .7rem;
  157. }
  158. #autocomplete-0-input {
  159. padding-inline-start: 2.5rem;
  160. }
  161. .aa-Form,
  162. .aa-InputWrapper {
  163. inline-size: 100%;
  164. }
  165. .aa-Form {
  166. padding-block: 1.231rem;
  167. padding-inline-start: .7rem;
  168. }
  169. .aa-DetachedCancelButton.btn-search-close {
  170. display: flex;
  171. align-items: center;
  172. justify-content: center;
  173. border: 0;
  174. background: none;
  175. gap: 1rem;
  176. inline-size: 8rem;
  177. inset-inline-end: 1.5rem;
  178. padding-inline-end: 1.75rem;
  179. }
  180. .aa-SourceHeader {
  181. margin-block-end: .5rem;
  182. }
  183. .aa-Item {
  184. display: flex;
  185. align-items: center;
  186. .item-wrapper {
  187. display: flex;
  188. align-items: center;
  189. gap: .5rem;
  190. }
  191. svg {
  192. color: var(--#{$prefix}secondary-color);
  193. font-size: 1rem;
  194. opacity: 0;
  195. :dir(rtl) & {
  196. transform: scaleX(-1);
  197. }
  198. }
  199. &:hover,
  200. &[aria-selected="true"] {
  201. background: var(--#{$prefix}gray-100);
  202. svg {
  203. opacity: 1;
  204. }
  205. }
  206. a {
  207. color: var(--#{$prefix}body-color);
  208. font-size: var(--#{$prefix}body-font-size);
  209. gap: .5rem;
  210. padding-block: .543rem;
  211. padding-inline: 1.25rem;
  212. }
  213. }
  214. }
  215. .search-no-results-wrapper {
  216. block-size: 28.75rem;
  217. }