gitea源码

search.css 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. /*!
  2. * # Fomantic-UI - Search
  3. * http://github.com/fomantic/Fomantic-UI/
  4. *
  5. *
  6. * Released under the MIT license
  7. * http://opensource.org/licenses/MIT
  8. *
  9. */
  10. /*******************************
  11. Search
  12. *******************************/
  13. .ui.search {
  14. position: relative;
  15. }
  16. .ui.search > .prompt {
  17. margin: 0;
  18. outline: none;
  19. -webkit-appearance: none;
  20. -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  21. text-shadow: none;
  22. font-style: normal;
  23. font-weight: normal;
  24. line-height: 1.21428571em;
  25. padding: 0.67857143em 1em;
  26. font-size: 1em;
  27. background: #FFFFFF;
  28. border: 1px solid rgba(34, 36, 38, 0.15);
  29. color: rgba(0, 0, 0, 0.87);
  30. box-shadow: 0 0 0 0 transparent inset;
  31. transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
  32. }
  33. .ui.search .prompt {
  34. border-radius: 500rem;
  35. }
  36. /*--------------
  37. Icon
  38. ---------------*/
  39. .ui.search .prompt ~ .search.icon {
  40. cursor: pointer;
  41. }
  42. /*--------------
  43. Results
  44. ---------------*/
  45. .ui.search > .results {
  46. display: none;
  47. position: absolute;
  48. top: 100%;
  49. left: 0;
  50. transform-origin: center top;
  51. white-space: normal;
  52. text-align: left;
  53. text-transform: none;
  54. background: #FFFFFF;
  55. margin-top: 0.5em;
  56. width: 18em;
  57. border-radius: 0.28571429rem;
  58. box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
  59. border: 1px solid #D4D4D5;
  60. z-index: 998;
  61. }
  62. .ui.search > .results > :first-child {
  63. border-radius: 0.28571429rem 0.28571429rem 0 0;
  64. }
  65. .ui.search > .results > :last-child {
  66. border-radius: 0 0 0.28571429rem 0.28571429rem;
  67. }
  68. /*--------------
  69. Result
  70. ---------------*/
  71. .ui.search > .results .result {
  72. cursor: pointer;
  73. display: block;
  74. overflow: hidden;
  75. font-size: 1em;
  76. padding: 0.85714286em 1.14285714em;
  77. color: rgba(0, 0, 0, 0.87);
  78. line-height: 1.33;
  79. border-bottom: 1px solid rgba(34, 36, 38, 0.1);
  80. }
  81. .ui.search > .results .result:last-child {
  82. border-bottom: none !important;
  83. }
  84. /* Image */
  85. .ui.search > .results .result .image {
  86. float: right;
  87. overflow: hidden;
  88. background: none;
  89. width: 5em;
  90. height: 3em;
  91. border-radius: 0.25em;
  92. }
  93. .ui.search > .results .result .image img {
  94. display: block;
  95. width: auto;
  96. height: 100%;
  97. }
  98. /*--------------
  99. Info
  100. ---------------*/
  101. .ui.search > .results .result .image + .content {
  102. margin: 0 6em 0 0;
  103. }
  104. .ui.search > .results .result .title {
  105. margin: -0.14285714em 0 0;
  106. font-family: var(--fonts-regular);
  107. font-weight: 500;
  108. font-size: 1em;
  109. color: rgba(0, 0, 0, 0.85);
  110. }
  111. .ui.search > .results .result .description {
  112. margin-top: 0;
  113. font-size: 0.92857143em;
  114. color: rgba(0, 0, 0, 0.4);
  115. }
  116. .ui.search > .results .result .price {
  117. float: right;
  118. color: #21BA45;
  119. }
  120. /*--------------
  121. Message
  122. ---------------*/
  123. .ui.search > .results > .message {
  124. padding: 1em 1em;
  125. }
  126. .ui.search > .results > .message .header {
  127. font-family: var(--fonts-regular);
  128. font-size: 1rem;
  129. font-weight: 500;
  130. color: rgba(0, 0, 0, 0.87);
  131. }
  132. .ui.search > .results > .message .description {
  133. margin-top: 0.25rem;
  134. font-size: 1em;
  135. color: rgba(0, 0, 0, 0.87);
  136. }
  137. /* View All Results */
  138. .ui.search > .results > .action {
  139. display: block;
  140. border-top: none;
  141. background: #F3F4F5;
  142. padding: 0.92857143em 1em;
  143. color: rgba(0, 0, 0, 0.87);
  144. font-weight: 500;
  145. text-align: center;
  146. }
  147. /*******************************
  148. States
  149. *******************************/
  150. /*--------------------
  151. Focus
  152. ---------------------*/
  153. .ui.search > .prompt:focus {
  154. border-color: rgba(34, 36, 38, 0.35);
  155. background: #FFFFFF;
  156. color: rgba(0, 0, 0, 0.95);
  157. }
  158. /*--------------------
  159. Loading
  160. ---------------------*/
  161. .ui.loading.search .input > i.icon:before {
  162. position: absolute;
  163. content: '';
  164. top: 50%;
  165. left: 50%;
  166. margin: -0.64285714em 0 0 -0.64285714em;
  167. width: 1.28571429em;
  168. height: 1.28571429em;
  169. border-radius: 500rem;
  170. border: 0.2em solid rgba(0, 0, 0, 0.1);
  171. }
  172. .ui.loading.search .input > i.icon:after {
  173. position: absolute;
  174. content: '';
  175. top: 50%;
  176. left: 50%;
  177. margin: -0.64285714em 0 0 -0.64285714em;
  178. width: 1.28571429em;
  179. height: 1.28571429em;
  180. animation: loader 0.6s infinite linear;
  181. border: 0.2em solid #767676;
  182. border-radius: 500rem;
  183. box-shadow: 0 0 0 1px transparent;
  184. }
  185. /*--------------
  186. Hover
  187. ---------------*/
  188. .ui.search > .results .result:hover,
  189. .ui.category.search > .results .category .result:hover {
  190. background: #F9FAFB;
  191. }
  192. .ui.search .action:hover:not(div) {
  193. background: #E0E0E0;
  194. }
  195. /*--------------
  196. Active
  197. ---------------*/
  198. .ui.category.search > .results .category.active {
  199. background: #F3F4F5;
  200. }
  201. .ui.category.search > .results .category.active > .name {
  202. color: rgba(0, 0, 0, 0.87);
  203. }
  204. .ui.search > .results .result.active,
  205. .ui.category.search > .results .category .result.active {
  206. position: relative;
  207. border-left-color: rgba(34, 36, 38, 0.1);
  208. background: #F3F4F5;
  209. box-shadow: none;
  210. }
  211. .ui.search > .results .result.active .title {
  212. color: rgba(0, 0, 0, 0.85);
  213. }
  214. .ui.search > .results .result.active .description {
  215. color: rgba(0, 0, 0, 0.85);
  216. }
  217. /*--------------------
  218. Disabled
  219. ----------------------*/
  220. /* Disabled */
  221. .ui.disabled.search {
  222. cursor: default;
  223. pointer-events: none;
  224. opacity: var(--opacity-disabled);
  225. }
  226. /*******************************
  227. Types
  228. *******************************/
  229. /*--------------
  230. Selection
  231. ---------------*/
  232. .ui.search.selection .prompt {
  233. border-radius: 0.28571429rem;
  234. }
  235. /* Remove input */
  236. .ui.search.selection > .icon.input > .remove.icon {
  237. pointer-events: none;
  238. position: absolute;
  239. left: auto;
  240. opacity: 0;
  241. color: '';
  242. top: 0;
  243. right: 0;
  244. transition: color 0.1s ease, opacity 0.1s ease;
  245. }
  246. .ui.search.selection > .icon.input > .active.remove.icon {
  247. cursor: pointer;
  248. opacity: 0.8;
  249. pointer-events: auto;
  250. }
  251. .ui.search.selection > .icon.input:not([class*="left icon"]) > .icon ~ .remove.icon {
  252. right: 1.85714em;
  253. }
  254. .ui.search.selection > .icon.input > .remove.icon:hover {
  255. opacity: 1;
  256. color: #DB2828;
  257. }
  258. /*--------------
  259. Category
  260. ---------------*/
  261. .ui.category.search .results {
  262. width: 28em;
  263. }
  264. .ui.category.search .results.animating,
  265. .ui.category.search .results.visible {
  266. display: table;
  267. }
  268. /* Category */
  269. .ui.category.search > .results .category {
  270. display: table-row;
  271. background: #F3F4F5;
  272. box-shadow: none;
  273. transition: background 0.1s ease, border-color 0.1s ease;
  274. }
  275. /* Last Category */
  276. .ui.category.search > .results .category:last-child {
  277. border-bottom: none;
  278. }
  279. /* First / Last */
  280. .ui.category.search > .results .category:first-child .name + .result {
  281. border-radius: 0 0.28571429rem 0 0;
  282. }
  283. .ui.category.search > .results .category:last-child .result:last-child {
  284. border-radius: 0 0 0.28571429rem 0;
  285. }
  286. /* Category Result Name */
  287. .ui.category.search > .results .category > .name {
  288. display: table-cell;
  289. text-overflow: ellipsis;
  290. width: 100px;
  291. white-space: nowrap;
  292. background: transparent;
  293. font-family: var(--fonts-regular);
  294. font-size: 1em;
  295. padding: 0.4em 1em;
  296. font-weight: 500;
  297. color: rgba(0, 0, 0, 0.4);
  298. border-bottom: 1px solid rgba(34, 36, 38, 0.1);
  299. }
  300. /* Category Result */
  301. .ui.category.search > .results .category .results {
  302. display: table-cell;
  303. background: #FFFFFF;
  304. border-left: 1px solid rgba(34, 36, 38, 0.15);
  305. border-bottom: 1px solid rgba(34, 36, 38, 0.1);
  306. }
  307. .ui.category.search > .results .category .result {
  308. border-bottom: 1px solid rgba(34, 36, 38, 0.1);
  309. transition: background 0.1s ease, border-color 0.1s ease;
  310. padding: 0.85714286em 1.14285714em;
  311. }
  312. /*******************************
  313. Variations
  314. *******************************/
  315. /*-------------------
  316. Scrolling
  317. --------------------*/
  318. .ui.scrolling.search > .results,
  319. .ui.search.long > .results,
  320. .ui.search.short > .results {
  321. overflow-x: hidden;
  322. overflow-y: auto;
  323. backface-visibility: hidden;
  324. -webkit-overflow-scrolling: touch;
  325. }
  326. @media only screen and (max-width: 767.98px) {
  327. .ui.scrolling.search > .results {
  328. max-height: 12.17714286em;
  329. }
  330. }
  331. @media only screen and (min-width: 768px) {
  332. .ui.scrolling.search > .results {
  333. max-height: 18.26571429em;
  334. }
  335. }
  336. @media only screen and (min-width: 992px) {
  337. .ui.scrolling.search > .results {
  338. max-height: 24.35428571em;
  339. }
  340. }
  341. @media only screen and (min-width: 1920px) {
  342. .ui.scrolling.search > .results {
  343. max-height: 36.53142857em;
  344. }
  345. }
  346. @media only screen and (max-width: 767.98px) {
  347. .ui.search.short > .results {
  348. max-height: 12.17714286em;
  349. }
  350. .ui.search[class*="very short"] > .results {
  351. max-height: 9.13285714em;
  352. }
  353. .ui.search.long > .results {
  354. max-height: 24.35428571em;
  355. }
  356. .ui.search[class*="very long"] > .results {
  357. max-height: 36.53142857em;
  358. }
  359. }
  360. @media only screen and (min-width: 768px) {
  361. .ui.search.short > .results {
  362. max-height: 18.26571429em;
  363. }
  364. .ui.search[class*="very short"] > .results {
  365. max-height: 13.69928571em;
  366. }
  367. .ui.search.long > .results {
  368. max-height: 36.53142857em;
  369. }
  370. .ui.search[class*="very long"] > .results {
  371. max-height: 54.79714286em;
  372. }
  373. }
  374. @media only screen and (min-width: 992px) {
  375. .ui.search.short > .results {
  376. max-height: 24.35428571em;
  377. }
  378. .ui.search[class*="very short"] > .results {
  379. max-height: 18.26571429em;
  380. }
  381. .ui.search.long > .results {
  382. max-height: 48.70857143em;
  383. }
  384. .ui.search[class*="very long"] > .results {
  385. max-height: 73.06285714em;
  386. }
  387. }
  388. @media only screen and (min-width: 1920px) {
  389. .ui.search.short > .results {
  390. max-height: 36.53142857em;
  391. }
  392. .ui.search[class*="very short"] > .results {
  393. max-height: 27.39857143em;
  394. }
  395. .ui.search.long > .results {
  396. max-height: 73.06285714em;
  397. }
  398. .ui.search[class*="very long"] > .results {
  399. max-height: 109.59428571em;
  400. }
  401. }
  402. /*-------------------
  403. Left / Right
  404. --------------------*/
  405. .ui[class*="left aligned"].search > .results {
  406. right: auto;
  407. left: 0;
  408. }
  409. .ui[class*="right aligned"].search > .results {
  410. right: 0;
  411. left: auto;
  412. }
  413. /*--------------
  414. Fluid
  415. ---------------*/
  416. .ui.fluid.search .results {
  417. width: 100%;
  418. }
  419. /*--------------
  420. Sizes
  421. ---------------*/
  422. .ui.search {
  423. font-size: 1em;
  424. }
  425. .ui.mini.search {
  426. font-size: 0.78571429em;
  427. }
  428. .ui.tiny.search {
  429. font-size: 0.85714286em;
  430. }
  431. .ui.small.search {
  432. font-size: 0.92857143em;
  433. }
  434. .ui.large.search {
  435. font-size: 1.14285714em;
  436. }
  437. .ui.big.search {
  438. font-size: 1.28571429em;
  439. }
  440. .ui.huge.search {
  441. font-size: 1.42857143em;
  442. }
  443. .ui.massive.search {
  444. font-size: 1.71428571em;
  445. }
  446. /*--------------
  447. Mobile
  448. ---------------*/
  449. @media only screen and (max-width: 767.98px) {
  450. .ui.search .results {
  451. max-width: calc(100vw - 2rem);
  452. }
  453. }
  454. /*******************************
  455. Theme Overrides
  456. *******************************/
  457. /*******************************
  458. Site Overrides
  459. *******************************/