search.less 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * searx, A privacy-respecting, hackable metasearch engine
  3. */
  4. #search {
  5. padding: 0 2em;
  6. margin: 0;
  7. background: #f7f7f7;
  8. border-bottom: 1px solid #d7d7d7;
  9. }
  10. #search_wrapper {
  11. padding: 10px 0;
  12. }
  13. .search_box {
  14. margin: 0 12px 0 0;
  15. display: inline-flex;
  16. flex-direction: row;
  17. white-space: nowrap;
  18. /*
  19. &:has(q:focus) {
  20. box-shadow: 0px 0px 5px #CCC;
  21. }
  22. */
  23. }
  24. #q, #send_search {
  25. display: block !important;
  26. border-collapse: separate;
  27. box-sizing: border-box;
  28. position: relative;
  29. margin: 0;
  30. padding: 2px;
  31. height: 2.2em;
  32. background: none repeat scroll 0 0 @color-search-background;
  33. border: 1px solid @color-search-border;
  34. border-radius: 0px;
  35. outline: none;
  36. color: @color-search-font;
  37. font-size: 16px;
  38. z-index: 2;
  39. }
  40. #q {
  41. outline: medium none;
  42. padding-left: 8px;
  43. padding-right: 0px !important;
  44. border-right: none;
  45. width: @search-width;
  46. }
  47. #send_search {
  48. border-left: none;
  49. width: 2.2em;
  50. &:hover {
  51. cursor: pointer;
  52. background-color: @color-search-border;
  53. color: @color-base-light;
  54. }
  55. }
  56. .no-js #send_search {
  57. width: auto !important;
  58. }
  59. .search_filters {
  60. display: inline-block;
  61. vertical-align: middle;
  62. }
  63. @media screen and (max-width: 75em) {
  64. #categories {
  65. font-size: 90%;
  66. clear: both;
  67. .checkbox_container {
  68. margin-top: 2px;
  69. margin: auto;
  70. }
  71. }
  72. html.touch {
  73. #main_index, #main_results {
  74. #categories_container {
  75. width: 1000px;
  76. width: -moz-max-content;
  77. width: -webkit-max-content;
  78. width: max-content;
  79. .category {
  80. display: inline-block;
  81. width: auto;
  82. }
  83. }
  84. #categories {
  85. width: 100%;
  86. margin: 0;
  87. text-align: left;
  88. overflow-x: scroll;
  89. overflow-y: hidden;
  90. -webkit-overflow-scrolling: touch;
  91. }
  92. }
  93. }
  94. }
  95. @media screen and (max-width: @results-width) {
  96. #search {
  97. width: 100%;
  98. margin: 0;
  99. padding: 0.1em 0 0 0;
  100. }
  101. #search_wrapper {
  102. width: 100%;
  103. margin: 0 0 0.7em 0;
  104. padding: 0;
  105. }
  106. .search_box {
  107. // hack, should bew 100% ?
  108. width: 99%;
  109. margin: 0.1em;
  110. padding: 0 0.1em 0 0;
  111. display: flex;
  112. flex-direction: row;
  113. }
  114. #q {
  115. width: auto !important;
  116. flex: 1;
  117. }
  118. .search_filters {
  119. display: block;
  120. margin: 0.5em;
  121. }
  122. .language, .time_range {
  123. width: 45%;
  124. }
  125. .category {
  126. display: block;
  127. width: 90%;
  128. label {
  129. border-bottom: 0;
  130. }
  131. }
  132. }
  133. #categories {
  134. margin: 0 10px 0 0;
  135. .disable-user-select;
  136. &::-webkit-scrollbar {
  137. width: 0;
  138. height: 0;
  139. }
  140. }
  141. .category {
  142. display: inline-block;
  143. position: relative;
  144. margin: 0 3px;
  145. padding: 0px;
  146. input {
  147. display: none;
  148. }
  149. label {
  150. cursor: pointer;
  151. padding: 4px 10px;
  152. margin: 0;
  153. display: block;
  154. text-transform: capitalize;
  155. font-size: 0.9em;
  156. border-bottom: 2px solid transparent;
  157. .disable-user-select;
  158. }
  159. input[type="checkbox"]:focus + label {
  160. box-shadow: 0px 0px 8px #3498DB;
  161. }
  162. /*label:hover {
  163. border-bottom: 2px solid @color-categories-item-border-unselected-hover;
  164. }*/
  165. input[type="checkbox"]:checked + label {
  166. background: @color-categories-item-selected;
  167. color: @color-categories-item-selected-font;
  168. border-bottom: 2px solid @color-categories-item-border-selected;
  169. }
  170. }
  171. #categories_container {
  172. position: relative;
  173. .help {
  174. position: absolute;
  175. width: 100%;
  176. bottom: -20px;
  177. overflow: hidden;
  178. opacity: 0;
  179. transition: opacity 1s ease;
  180. font-size: 0.8em;
  181. text-position: center;
  182. background: white;
  183. }
  184. &:hover .help {
  185. opacity: 0.8;
  186. transition: opacity 1s ease;
  187. }
  188. }