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.

264 lines
5.1 KiB

  1. /*
  2. * # Semantic - Search
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributor
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'module';
  15. @element : 'search';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Search
  19. *******************************/
  20. .ui.search {
  21. position: relative;
  22. text-shadow: none;
  23. font-style: normal;
  24. font-weight: normal;
  25. }
  26. .ui.search input {
  27. border-radius: @promptBorderRadius;
  28. }
  29. /*--------------
  30. Icon
  31. ---------------*/
  32. .ui.search .prompt ~ .search.icon {
  33. cursor: pointer;
  34. }
  35. /*--------------
  36. Results
  37. ---------------*/
  38. .ui.search .results {
  39. display: none;
  40. position: absolute;
  41. z-index: 998;
  42. top: 100%;
  43. left: 0%;
  44. overflow: hidden;
  45. background: @resultsBackground;
  46. margin-top: @resultsDistance;
  47. width: @resultsWidth;
  48. border-radius: @resultsBorderRadius;
  49. box-shadow: @resultsBoxShadow;
  50. }
  51. /*--------------
  52. Result
  53. ---------------*/
  54. .ui.search .result {
  55. font-family: @pageFont;
  56. cursor: pointer;
  57. overflow: hidden;
  58. font-size: @resultFontSize;
  59. padding: @resultVerticalPadding @resultHorizontalPadding;
  60. color: @resultTextColor;
  61. line-height: @resultLineHeight;
  62. }
  63. .ui.search .result:first-child {
  64. border-top: none;
  65. }
  66. /* Image */
  67. .ui.search .result .image {
  68. float: @resultImageFloat;
  69. overflow: hidden;
  70. background: @resultImageBackground;
  71. width: @resultImageWidth;
  72. height: @resultImageHeight;
  73. border-radius: @resultImageBorderRadius;
  74. }
  75. .ui.search .result .image img {
  76. display: block;
  77. width: auto;
  78. height: 100%;
  79. }
  80. /*--------------
  81. Info
  82. ---------------*/
  83. .ui.search .result .image + .content {
  84. margin: @resultImageMargin;
  85. }
  86. .ui.search .result .title {
  87. font-family: @resultTitleFont;
  88. font-weight: @resultTitleFontWeight;
  89. color: @resultTitleColor;
  90. }
  91. .ui.search .result .description {
  92. color: @resultDescriptionColor;
  93. }
  94. .ui.search .result .price {
  95. float: @resultPriceFloat;
  96. color: @resultPriceColor;
  97. }
  98. /*--------------
  99. Message
  100. ---------------*/
  101. .ui.search .message {
  102. padding: @messageVerticalPadding @messageHorizontalPadding;
  103. }
  104. .ui.search .message .header {
  105. font-family: @headerFont;
  106. font-size: @messageHeaderFontSize;
  107. font-weight: @messageHeaderFontWeight;
  108. color: @messageHeaderColor;
  109. }
  110. .ui.search .message .description {
  111. margin-top: @messageDescriptionDistance;
  112. font-size: @messageDescriptionFontSize;
  113. color: @messageDescriptionColor;
  114. }
  115. /* View All Results */
  116. .ui.search .all {
  117. display: block;
  118. border-top: @allResultsBorder;
  119. background-color: @allResultsBackground;
  120. height: @allResultsHeight;
  121. line-height: @allResultsHeight;
  122. color: @allResultsColor;
  123. font-weight: @allResultsFontWeight;
  124. text-align: @allResultsAlign;
  125. }
  126. /*******************************
  127. States
  128. *******************************/
  129. /*--------------
  130. Hover
  131. ---------------*/
  132. .ui.search .result:hover,
  133. .ui.search .results .category .result:hover {
  134. background: @resultHoverBackground;
  135. }
  136. .ui.search .all:hover {
  137. background: @allResultsHoverBackground;
  138. }
  139. /*--------------
  140. Loading
  141. ---------------*/
  142. .ui.search.loading .input .icon {
  143. background: url(@loaderPath) no-repeat 50% 50%;
  144. }
  145. .ui.search.loading .input .icon:before,
  146. .ui.search.loading .input .icon:after {
  147. display: none;
  148. }
  149. /*--------------
  150. Active
  151. ---------------*/
  152. .ui.search .results .category.active {
  153. background-color: @categoryActiveBackground;
  154. }
  155. .ui.search .results .category.active > .name {
  156. color: @categoryNameActiveColor;
  157. }
  158. .ui.search .result.active,
  159. .ui.search .results .category .result.active {
  160. border-left-color: @resultActiveBorderLeft;
  161. background-color: @resultActiveBackground;
  162. box-shadow: @resultActiveBoxShadow;
  163. }
  164. .ui.search .result.active .title {
  165. color: @resultActiveTitleColor;
  166. }
  167. .ui.search .result.active .description {
  168. color: @resultActiveDescriptionColor;
  169. }
  170. /*******************************
  171. Types
  172. *******************************/
  173. /*-------------------
  174. Left / Right
  175. --------------------*/
  176. .ui.right.aligned.search .results {
  177. right: 0%;
  178. left: auto;
  179. }
  180. /*--------------
  181. Categories
  182. ---------------*/
  183. .ui.search .results .category {
  184. background: @categoryBackground;
  185. box-shadow: @categoryBoxShadow;
  186. }
  187. .ui.search .results .category,
  188. .ui.search .results .category .result {
  189. position: relative;
  190. transition: @categoryResultTransition;
  191. }
  192. .ui.search .results .category:first-child {
  193. box-shadow: none;
  194. }
  195. .ui.search .results .category > .name {
  196. font-family: @categoryNameFont;
  197. float: @categoryNameFontSize;
  198. float: @categoryNameFloat;
  199. padding: @categoryNamePadding;
  200. font-weight: @categoryNameFontWeight;
  201. color: @categoryNameColor;
  202. }
  203. .ui.search .results .category .result {
  204. background-color: @categoryResultBackground;
  205. margin-left: @categoryNameWidth;
  206. border-left: @categoryResultLeftBorder;
  207. border-bottom: @categoryResultTopBorder;
  208. }
  209. /*******************************
  210. Variations
  211. *******************************/
  212. .ui.search {
  213. font-size: @medium;
  214. }
  215. .ui.large.search {
  216. font-size: @large;
  217. }
  218. .loadUIOverrides();