search.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. /* IMPORTANT!
  2. This file is loaded dynamically when the inline search is invoked.
  3. So don't put main popup's stuff here. */
  4. body.search-results-shown {
  5. overflow-y: auto;
  6. overflow-x: hidden;
  7. }
  8. #search-results:not([data-empty]):before {
  9. background-image: linear-gradient(transparent, rgba(0, 0, 0, .3) 200px);
  10. content: "";
  11. top: -50px;
  12. left: -1000px;
  13. right: -1000px;
  14. bottom: -12px;
  15. position: absolute;
  16. pointer-events: none;
  17. animation: fadein 1s;
  18. animation-fill-mode: both;
  19. }
  20. #search-results {
  21. position: relative;
  22. margin-top: -1em;
  23. }
  24. #search-results-error {
  25. background-color: rgba(255, 0, 0, 0.4);
  26. font-weight: bold;
  27. padding: 5px;
  28. text-align: center;
  29. margin: 0 0 var(--outer-padding);
  30. }
  31. #search-results-list {
  32. position: relative;
  33. min-height: 224px;
  34. }
  35. .search-result,
  36. .search-result-empty {
  37. --pad: 8px;
  38. position: relative;
  39. padding: var(--pad) var(--pad) 21px;
  40. min-height: 160px;
  41. }
  42. .search-result {
  43. box-shadow: 1px 1px 10px rgba(0, 0, 0, .75);
  44. border-radius: 4px;
  45. border: 1px solid #555;
  46. margin-bottom: 24px;
  47. background-color: #eee;
  48. }
  49. .search-result:hover {
  50. border-color: #000;
  51. background-color: #fff;
  52. }
  53. #search-results .lds-spinner {
  54. transform: scale(.5);
  55. filter: invert(1) drop-shadow(1px 1px 3px #000);
  56. }
  57. #search-results .search-result-empty .lds-spinner {
  58. filter: opacity(.2);
  59. }
  60. .search-result-screenshot {
  61. height: 140px;
  62. width: 100%;
  63. object-fit: cover;
  64. cursor: pointer;
  65. }
  66. .search-result-title {
  67. display: flex;
  68. align-items: center;
  69. margin-bottom: .5em;
  70. color: #555;
  71. overflow-wrap: break-word;
  72. }
  73. .search-result-title img {
  74. width: 20px;
  75. height: 20px;
  76. margin: -6px 4px -6px 0;
  77. }
  78. .search-result-title span {
  79. font-size: 12px;
  80. font-weight: 600;
  81. }
  82. .search-result:hover .search-result-title {
  83. color: initial;
  84. }
  85. .search-result-info {
  86. position: relative;
  87. }
  88. .search-result .search-result-status {
  89. top: 0;
  90. left: 0;
  91. right: 0;
  92. line-height: 18px;
  93. text-align: center;
  94. position: absolute;
  95. background-color: hsla(180, 100%, 27%, .75);
  96. color: #fff;
  97. transition: background-color .5s;
  98. pointer-events: none;
  99. }
  100. .search-result[data-no-image] .search-result-status {
  101. line-height: 140px;
  102. }
  103. .search-result[data-no-image]:not([data-installed]) .search-result-status {
  104. background-color: rgba(128, 128, 128, .1);
  105. color: currentColor;
  106. }
  107. .search-result-screenshot:hover ~ .search-result-status {
  108. background-color: hsla(180, 100%, 27%, 1);
  109. color: #fff;
  110. }
  111. .search-result-actions {
  112. bottom: 20px;
  113. text-align: center;
  114. z-index: 10;
  115. position: absolute;
  116. width: 100%;
  117. }
  118. .search-result:not([data-installed]) .search-result-actions {
  119. opacity: 0;
  120. transition: opacity .5s;
  121. }
  122. .search-result:not([data-installed]):hover .search-result-actions {
  123. opacity: 1;
  124. }
  125. .search-result-actions button {
  126. box-shadow: 2px 2px 20px #000;
  127. white-space: nowrap;
  128. margin: 3px;
  129. }
  130. .search-result[data-no-image] .search-result-actions button {
  131. box-shadow: none;
  132. }
  133. .search-result-install,
  134. .search-result-uninstall,
  135. .search-result:not([data-installed]) .search-result-customize,
  136. .search-result:not([data-customizable]) .search-result-customize {
  137. display: none;
  138. }
  139. .search-result.not-matching .search-result-customize {
  140. opacity: .5;
  141. }
  142. .search-result-meta {
  143. background-color: hsla(0, 0%, 93%, 0.75);
  144. display: flex;
  145. justify-content: space-between;
  146. flex-wrap: wrap;
  147. bottom: 0;
  148. position: absolute;
  149. width: 100%;
  150. line-height: 16px;
  151. margin: 0;
  152. padding-bottom: 3px;
  153. }
  154. .search-result:hover .search-result-meta {
  155. background-color: hsla(0, 0%, 100%, 0.75);
  156. }
  157. .search-result-meta dt {
  158. display: none;
  159. }
  160. .search-result-meta dd {
  161. margin: 0;
  162. }
  163. .search-result-meta [data-type="author"] {
  164. max-width: 30%;
  165. }
  166. .search-result-meta [data-type="author"] a {
  167. color: inherit;
  168. font-weight: bold;
  169. white-space: nowrap;
  170. overflow: hidden;
  171. text-overflow: ellipsis;
  172. display: block;
  173. }
  174. .search-result-meta [data-type="rating"] dd {
  175. text-align: center;
  176. font-weight: bold;
  177. }
  178. .search-result-meta [data-type="rating"][data-class="good"] dd {
  179. color: darkgreen;
  180. }
  181. .search-result-meta [data-type="rating"][data-class="okay"] dd {
  182. color: darkgreen;
  183. }
  184. .search-result-meta [data-type="rating"][data-class="bad"] dd {
  185. color: darkred;
  186. }
  187. /* Keeping an empty rule so customizers can easily tweak it */
  188. search-result-meta [data-type="rating"][data-class="none"] dd {
  189. }
  190. .search-result-meta [data-type="weekly"],
  191. .search-result-meta [data-type="total"] {
  192. text-align: right;
  193. }
  194. .search-result-meta [data-type="weekly"] dd,
  195. .search-result-meta [data-type="total"] dd {
  196. font-weight: bold;
  197. }
  198. .search-result-description {
  199. padding: 0;
  200. font-size: 90%;
  201. white-space: nowrap;
  202. overflow: hidden;
  203. text-overflow: ellipsis;
  204. position: absolute;
  205. width: 100%;
  206. margin-top: 4px;
  207. }
  208. .not-matching-explainer {
  209. padding: var(--pad);
  210. margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) var(--pad);
  211. border-bottom: 2px solid hsla(25, 100%, 60%, .5);
  212. background-color: hsla(25, 100%, 60%, .2);
  213. cursor: help;
  214. }
  215. [data-error],
  216. [data-error]:hover {
  217. border: calc(var(--pad) / 2) solid red;
  218. border-radius: var(--pad);
  219. padding: calc(var(--pad) / 2);
  220. background: hsl(0, 90%, 85%);
  221. }
  222. [data-error]::after {
  223. content: attr(data-error);
  224. display: block;
  225. color: hsl(0, 100%, 8%);
  226. font-weight: bold;
  227. padding-top: var(--pad);
  228. hyphens: auto;
  229. }
  230. [data-error] .search-result-description {
  231. display: none;
  232. }
  233. [data-error] .search-result-meta {
  234. background: hsla(0, 100%, 90%, .80);
  235. }
  236. .search-results-nav {
  237. flex-direction: row;
  238. text-align: center;
  239. word-break: keep-all;
  240. }
  241. .search-results-nav[data-type="top"] {
  242. padding-top: 1em;
  243. margin-bottom: 1em;
  244. }
  245. .search-results-nav[data-type="bottom"] {
  246. margin-top: -1em;
  247. margin-bottom: 1em;
  248. }
  249. #search-results .search-results-nav button {
  250. background: none;
  251. border: none;
  252. padding: 0 1rem;
  253. margin: 0 .5rem;
  254. font-size: 150%;
  255. line-height: 24px;
  256. vertical-align: middle;
  257. cursor: pointer;
  258. }
  259. #search-results .search-results-nav button:disabled {
  260. cursor: auto;
  261. opacity: .25;
  262. pointer-events: none;
  263. }
  264. #search-results .search-results-nav button:not(:disabled):hover {
  265. text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  266. }
  267. #search-params {
  268. display: flex;
  269. position: relative;
  270. margin-top: -.5rem;
  271. margin-bottom: 1.25rem;
  272. flex-wrap: wrap;
  273. }
  274. #search-params > * {
  275. margin-top: .5rem;
  276. }
  277. #search-query {
  278. min-width: 3em;
  279. margin-right: .5em;
  280. flex: 1 1 0;
  281. }