search-typeahead.component.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. @import '_mixins';
  2. @import '_variables';
  3. @import '_bootstrap-variables';
  4. @import '~bootstrap/scss/mixins/_breakpoints';
  5. #search-video {
  6. @include peertube-input-text($search-input-width);
  7. padding-left: 10px;
  8. padding-right: 40px; // For the search icon
  9. font-size: 14px;
  10. &::placeholder {
  11. color: pvar(--inputPlaceholderColor);
  12. }
  13. }
  14. .icon-search {
  15. @include icon(25px);
  16. height: 18px;
  17. // yolo
  18. position: absolute;
  19. margin-left: -35px;
  20. margin-top: 3.5px;
  21. right: 10px;
  22. }
  23. .jump-to-suggestions {
  24. top: 100%;
  25. left: 0;
  26. z-index: z('search-typeahead');
  27. width: 100%;
  28. }
  29. #typeahead-help,
  30. #typeahead-instructions,
  31. li.suggestion {
  32. border: 1px solid pvar(--mainBackgroundColor);
  33. background: pvar(--mainBackgroundColor);
  34. transition: .3s ease;
  35. transition-property: box-shadow;
  36. cursor: pointer;
  37. // soft border-radius for the last suggestion and the link inside
  38. &:last-of-type {
  39. &, & ::ng-deep a {
  40. border-bottom-right-radius: 3px;
  41. border-bottom-left-radius: 3px;
  42. }
  43. }
  44. }
  45. #typeahead-help,
  46. #typeahead-instructions {
  47. margin-top: 10px;
  48. width: 100%;
  49. padding: .5rem 1rem;
  50. white-space: normal;
  51. ul {
  52. list-style: none;
  53. padding: 0;
  54. margin-bottom: .5rem;
  55. em {
  56. font-weight: 600;
  57. margin-right: 0.2rem;
  58. font-style: normal;
  59. }
  60. }
  61. }
  62. #typeahead-container {
  63. input {
  64. border: 1px solid pvar(--mainBackgroundColor) !important;
  65. box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 20px 0px;
  66. flex-grow: 1;
  67. transition: box-shadow .3s ease, width .2s ease;
  68. }
  69. @media screen and (min-width: $mobile-view) {
  70. margin-left: 10px;
  71. }
  72. @media screen and (max-width: $small-view) {
  73. flex: 1;
  74. input {
  75. width: 70px;
  76. }
  77. }
  78. span {
  79. right: 10px;
  80. }
  81. & > div:last-child {
  82. // we have to switch the display and not the opacity,
  83. // to avoid clashing with the rest of the interface.
  84. display: none;
  85. }
  86. &:focus,
  87. ::ng-deep &:focus-within {
  88. & > div:last-child {
  89. @media screen and (min-width: $mobile-view) {
  90. display: initial !important;
  91. }
  92. #typeahead-help,
  93. #typeahead-instructions,
  94. li.suggestion {
  95. box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 20px -5px;
  96. }
  97. }
  98. ::ng-deep input {
  99. box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 20px 0px;
  100. border-end-start-radius: 0;
  101. border-end-end-radius: 0;
  102. @include media-breakpoint-up(lg) {
  103. width: 500px;
  104. }
  105. }
  106. }
  107. }
  108. .glyphicon {
  109. top: 3px;
  110. }
  111. .advanced-search-status {
  112. height: max-content;
  113. cursor: default;
  114. &.c-help {
  115. cursor: help;
  116. }
  117. }
  118. .small-title {
  119. @include in-content-small-title;
  120. margin-bottom: .5rem;
  121. }
  122. ::ng-deep my-suggestion {
  123. width: 100%;
  124. }