_search-widget.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. @import "variables";
  2. .autocomplete-wrapper {
  3. position: relative;
  4. width: 200px;
  5. @media all and (max-width: $sm-breakpoint){
  6. width: 100%;
  7. padding: 0 6px;
  8. position: absolute;
  9. left: 0;
  10. top: 54px;
  11. transform: translateY(-200px);
  12. opacity: 0.5;
  13. transition: opacity 0.3s, transform 0s;
  14. .autocomplete {
  15. display: none;
  16. }
  17. &.focus {
  18. transform: translateY(0);
  19. opacity: 1;
  20. .autocomplete {
  21. display: block;
  22. }
  23. }
  24. }
  25. }
  26. .autocomplete {
  27. position: absolute;
  28. background-color: $gray-100;
  29. border-radius: 4px;
  30. top: 35px;
  31. right: 0;
  32. max-height: 80vh;
  33. width: 500px;
  34. overflow: hidden;
  35. @media all and (max-width: $sm-breakpoint){
  36. width: 100%;
  37. }
  38. ul {
  39. padding: 0;
  40. margin: 0;
  41. list-style-type: none;
  42. }
  43. li {
  44. padding: 12px;
  45. background-color: transparent;
  46. transition: background-color 0.2s;
  47. &.selected {
  48. background-color: $gray-300;
  49. }
  50. a {
  51. display: flex;
  52. align-items: baseline;
  53. }
  54. .title {
  55. color: $gray-800;
  56. width: 200px;
  57. font-size: 12px;
  58. }
  59. .heading {
  60. color: $gray-900;
  61. .hl {
  62. background-color: transparentize($brand-color, 0.85);
  63. color: darken($brand-color, 40%);
  64. }
  65. }
  66. }
  67. }