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.
 
 
 
 
 

242 lines
5.9 KiB

  1. /**
  2. * This file provides the design styles for the quick search.
  3. */
  4. .search.main-sidebar {
  5. @main-ico-dummy: @font-size-big + @margin-small*2; //FIXME copied from area_main-sidebar-nav
  6. @icon-size: @page-header_height;
  7. @icon-search_font-size: @font-size-big;
  8. @media @screen_md-lg {
  9. margin-left: -(@menu-margin-lg);
  10. }
  11. p.toggleSearch a,
  12. button[type="submit"] {
  13. .fontello();
  14. .hide-text-show-before();
  15. .icon-search();
  16. position: relative;
  17. width: @icon-size;
  18. min-height: @icon-size;
  19. overflow: visible;
  20. background-image: none;
  21. background-color: transparent; // fix
  22. border: solid 1px transparent;
  23. padding: 0;
  24. transition: @transition color, @transition background-color, @transition border-color;
  25. &:hover,
  26. &:focus,
  27. &:active {
  28. min-height: @icon-size;
  29. background-color: @ini_button_color;
  30. border: solid 1px @ini_button_background;
  31. &::after {
  32. background-color: @ini_button_background;
  33. }
  34. }
  35. &::before {
  36. width: 100%;
  37. color: inherit;
  38. font-size: @icon-search_font-size;
  39. text-align: center;
  40. margin: 0;
  41. }
  42. }
  43. p.toggleSearch {
  44. display: none;
  45. margin: -2px 0 0; // reverse transparent border and box-sizing of a child
  46. padding: 0;
  47. @media @screen_max-xxlg {
  48. margin-top: -1px;
  49. }
  50. a {
  51. min-width: (@toggle-showsidebar_width + 0.1); /* must be a bit a wider than @toggle-showsidebar_width to hide right border */
  52. width: @main-ico-dummy;
  53. border-radius: @fix_border-radius;
  54. color: @ini_nav_menu_color;
  55. text-decoration: none;
  56. box-sizing: border-box;
  57. &::before {
  58. position: absolute;
  59. top: 50%;
  60. left: 0;
  61. color: inherit;
  62. text-align: center;
  63. margin-top: -(@icon-search_font-size / 2);
  64. }
  65. &:hover,
  66. &:focus,
  67. &:active {
  68. background-color: @ini_nav_menu_hover_bg;
  69. border-color: @ini_nav_menu_hover_color;
  70. color: @ini_nav_menu_hover_color;
  71. }
  72. }
  73. }
  74. button[type="submit"] {
  75. position: absolute;
  76. top: 1px;
  77. bottom: 1px;
  78. right: 0;
  79. height: auto;
  80. min-height: (@icon-size - .2);
  81. color: @quicksearch-button-color;
  82. &:hover,
  83. &:focus,
  84. &:active {
  85. top: 0;
  86. bottom: 0;
  87. min-height: @icon-size;
  88. background-color: @ini_button_color;
  89. border: solid 1px @ini_button_background;
  90. color: @ini_button_background;
  91. }
  92. }
  93. /* + + + form + + + */
  94. form {
  95. position: relative;
  96. display: block;
  97. margin: 0 0 @margin-default;
  98. .no {
  99. display: block;
  100. #qsearch__in {
  101. width: 100%;
  102. padding-left: 10px;
  103. padding-right: @icon-size;
  104. }
  105. }
  106. input {
  107. min-height: @icon-size;
  108. box-sizing: border-box;
  109. }
  110. button[type="submit"] {
  111. border: solid 1px transparent;
  112. border-right-color: @ini_border;
  113. margin-left: -(@icon-size);
  114. &::after {
  115. content: '';
  116. position: absolute;
  117. top: 15%;
  118. bottom: 15%;
  119. width: 1px;
  120. left: -1px;
  121. background-color: @ini_border;
  122. transition: @transition background-color;
  123. }
  124. }
  125. div.ajax_qsearch {
  126. box-shadow: none;
  127. background-color: #FFF;
  128. padding: 0;
  129. strong {
  130. color: @quicksearch-button-color;
  131. padding: 0.25rem 0.5rem
  132. }
  133. ul li {
  134. color: @quicksearch-button-color;
  135. a {
  136. display: block;
  137. padding: 0.25rem 0.5rem;
  138. overflow: hidden;
  139. color: inherit;
  140. text-overflow: ellipsis;
  141. }
  142. }
  143. ul li {
  144. &:nth-child(odd) {
  145. background-color: @suggestion-zebra;
  146. }
  147. }
  148. }
  149. }
  150. /* + + + + + suggestionlist + + + + + */
  151. #qsearch__out {
  152. left: auto;
  153. top: auto;
  154. width: 100%;
  155. min-width: 20rem;
  156. }
  157. }
  158. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  159. /* min-width: 1024px */
  160. @media @screen_min-md {
  161. // wide page content
  162. .wide-content {
  163. .search.main-sidebar {
  164. p.toggleSearch {
  165. position: relative;
  166. display: block;
  167. float: left;
  168. width: auto;
  169. }
  170. form {
  171. input {
  172. border: 0 none;
  173. }
  174. .no {
  175. #qsearch__in {
  176. width: 0;
  177. padding: 0;
  178. margin: 0;
  179. }
  180. button[type="submit"] {
  181. display: none;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  189. /* max-width: 1023px */
  190. @media @screen_max-md {
  191. // show when toggled
  192. body.show-mobile-sidebar {
  193. p.toggleSearch {
  194. display: none !important;
  195. }
  196. .search.main-sidebar {
  197. display: block !important;
  198. position: relative;
  199. margin-left: -1px;
  200. margin-right: -1px;
  201. form {
  202. margin-bottom: 1rem;
  203. }
  204. }
  205. }
  206. }