style.less 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. /*
  2. * searx, A privacy-respecting, hackable metasearch engine
  3. *
  4. * To convert "style.less" to "style.css" run: $make styles
  5. */
  6. @import "normalize.less";
  7. @import "definitions.less";
  8. @import "mixins.less";
  9. @import "code.less";
  10. @import "toolkit.less";
  11. @import "autocomplete.less";
  12. // ion-icon
  13. @import "ion.less";
  14. .ion-icon-big {
  15. .ion-icon;
  16. font-size: 149%;
  17. }
  18. // for index.html template
  19. @import "index.less";
  20. // for preferences.html template
  21. @import "preferences.less";
  22. // Search-Field
  23. @import "search.less";
  24. // Main LESS-Code
  25. html {
  26. font-family: arial, sans-serif;
  27. font-size: 0.9em;
  28. .text-size-adjust;
  29. color: @color-font;
  30. padding: 0;
  31. margin: 0;
  32. }
  33. body, main {
  34. padding: 0;
  35. margin: 0;
  36. }
  37. main {
  38. width: 100%;
  39. // position: absolute;
  40. }
  41. footer {
  42. // position:absolute;
  43. bottom:0;
  44. width:100%;
  45. height:50px;
  46. }
  47. #main_preferences, #main_about, #main_stats {
  48. margin: 3em;
  49. width: auto;
  50. }
  51. footer {
  52. bottom: 0;
  53. height: 3em;
  54. margin: 1em 0;
  55. padding: 1em 0;
  56. clear: both;
  57. width: 100%;
  58. text-align: center;
  59. p {
  60. font-size: 0.9em;
  61. }
  62. }
  63. #main_preferences h1, #main_stats h1 {
  64. background: url('../img/searx.png') no-repeat;
  65. background-size: auto 75%;
  66. min-height: 40px;
  67. margin: 0 auto;
  68. span {
  69. visibility: hidden;
  70. }
  71. }
  72. input[type="submit"], #results button[type="submit"] {
  73. padding: 0.5rem;
  74. margin: 2px 4px;
  75. display: inline-block;
  76. background: @color-download-button-background;
  77. color: @color-download-button-font;
  78. .rounded-corners;
  79. border: 0;
  80. cursor: pointer;
  81. }
  82. a {
  83. text-decoration: none;
  84. color: @color-url-font;
  85. &:visited {
  86. color: @color-url-visited-font;
  87. .highlight {
  88. color: @color-url-visited-font;
  89. }
  90. }
  91. }
  92. article[data-vim-selected] {
  93. background: #f7f7f7;
  94. }
  95. article[data-vim-selected]::before {
  96. position: absolute;
  97. left: 1em;
  98. padding: 2px;
  99. content: ">";
  100. font-weight: bold;
  101. color: @color-base;
  102. }
  103. article.result-images[data-vim-selected] {
  104. background: @color-base;
  105. }
  106. article.result-images[data-vim-selected]::before {
  107. display: none;
  108. content: "";
  109. }
  110. .result {
  111. margin: 19px 0 18px 0;
  112. padding: 0;
  113. h3 {
  114. font-size: 1.1em;
  115. word-wrap:break-word;
  116. margin: 5px 0 1px 0;
  117. padding: 0;
  118. margin-bottom: 0;
  119. a {
  120. color: @color-result-link-font;
  121. font-weight: normal;
  122. font-size: 1.1em;
  123. &:visited {
  124. color: @color-result-link-visited-font;
  125. }
  126. &:focus, &:hover {
  127. text-decoration: underline;
  128. border: none;
  129. -webkit-box-shadow: none;
  130. box-shadow: none;
  131. outline:none;
  132. }
  133. }
  134. }
  135. .cache_link, .proxyfied_link {
  136. font-size: 0.9em !important;
  137. }
  138. .content, .stat, .altlink {
  139. font-size: 0.9em;
  140. margin: 0;
  141. padding: 0;
  142. max-width: 54em;
  143. word-wrap:break-word;
  144. line-height: 1.24;
  145. .highlight {
  146. color: @color-black;
  147. background: inherit;
  148. font-weight: bold;
  149. }
  150. }
  151. .codelines {
  152. .highlight {
  153. color: inherit;
  154. background: inherit;
  155. font-weight: normal;
  156. }
  157. }
  158. .url {
  159. font-size: 0.9em;
  160. margin: 0 0 3px 0;
  161. padding: 0;
  162. max-width: 54em;
  163. word-wrap:break-word;
  164. color: @color-result-url-font;
  165. }
  166. .published_date {
  167. font-size: 0.8em;
  168. color: @color-result-publishdate-font;
  169. }
  170. img {
  171. &.thumbnail {
  172. float: left;
  173. padding: 0 5px 10px 0;
  174. width: 20em;
  175. min-width: 20em;
  176. min-height: 8em;
  177. // background: @color-base-light;
  178. }
  179. &.image {
  180. float: left;
  181. padding: 0 5px 10px 0;
  182. width: 100px;
  183. max-height: 100px;
  184. object-fit: scale-down;
  185. object-position: right top;
  186. }
  187. }
  188. .break {
  189. clear: both;
  190. }
  191. }
  192. .category-social .image {
  193. width: auto !important;
  194. min-width: 48px;
  195. min-height: 48px;
  196. padding: 0 5px 25px 0 !important;
  197. }
  198. .result-videos .content {
  199. overflow: hidden;
  200. }
  201. .engines {
  202. float: right;
  203. color: @color-engines-font;
  204. span {
  205. font-size: smaller;
  206. margin: 0 0.5em 0 0;
  207. }
  208. }
  209. .small_font {
  210. font-size: 0.8em;
  211. }
  212. .highlight {
  213. color: @color-highlight;
  214. background: inherit;
  215. font-weight: bold;
  216. }
  217. .result-images {
  218. display: inline-block;
  219. margin: 0;
  220. padding: 0;
  221. position: relative;
  222. max-height: 200px;
  223. img {
  224. float: inherit;
  225. margin: 0;
  226. padding: 0;
  227. border: none;
  228. max-height: 200px;
  229. background: @color-base-dark;
  230. }
  231. span a {
  232. display: none;
  233. color: @color-result-image-span-font;
  234. }
  235. &:hover span a {
  236. display: block;
  237. position: absolute;
  238. bottom: 0;
  239. right: 0;
  240. padding: 4px;
  241. margin: 0 0 4px 4px;
  242. background-color: @color-result-image-span-background-hover;
  243. font-size: 0.7em;
  244. }
  245. }
  246. .torrent_result {
  247. border-left: 10px solid @color-result-torrent-border;
  248. padding-left: 3px;
  249. p {
  250. margin: 3px;
  251. font-size: 0.8em;
  252. }
  253. a {
  254. color: @color-result-link-font;
  255. &:hover {
  256. text-decoration: underline;
  257. }
  258. &:visited {
  259. color: @color-result-link-visited-font;
  260. }
  261. }
  262. }
  263. #results {
  264. margin: 2em 2em 20px 2em;
  265. padding: 0;
  266. width: @results-width;
  267. }
  268. #suggestions {
  269. .wrapper {
  270. display: flex;
  271. flex-flow: row wrap;
  272. justify-content: flex-end;
  273. form {
  274. display: inline-block;
  275. flex: 1 1 50%;
  276. }
  277. }
  278. }
  279. #suggestions, #answers, #corrections {
  280. max-width: @results-width;
  281. }
  282. #suggestions, #answers, #infoboxes, #corrections {
  283. input {
  284. padding: 0;
  285. margin: 3px;
  286. font-size: 0.9em;
  287. display: inline-block;
  288. background: transparent;
  289. color: @color-result-search-url-font;
  290. cursor: pointer;
  291. }
  292. input[type="submit"], .infobox .url a {
  293. color: @color-result-link-font;
  294. text-decoration: none;
  295. font-size: 0.9rem;
  296. &:hover {
  297. text-decoration: underline;
  298. }
  299. }
  300. }
  301. #corrections {
  302. display: flex;
  303. flex-flow: row wrap;
  304. margin: 1em 0;
  305. h4, input[type="submit"] {
  306. display: inline-block;
  307. margin: 0 0.5em 0 0;
  308. }
  309. input[type="submit"]::after {
  310. content: ", "
  311. }
  312. }
  313. #suggestions .title, #search_url .title, #apis .title {
  314. margin: 2em 0 0.5em 0;
  315. color: @color-font;
  316. }
  317. #answers {
  318. margin: 10px 8px 10px 8px;
  319. border: 1px solid #ddd;
  320. padding: 0.9em;
  321. box-shadow: 0px 0px 5px #CCC;
  322. h4 {
  323. display: none;
  324. }
  325. .answer {
  326. display: block;
  327. font-size: 1.2em;
  328. font-weight: bold;
  329. }
  330. }
  331. #answers, #infoboxes {
  332. form {
  333. min-width: 210px;
  334. }
  335. }
  336. #sidebar {
  337. position: absolute;
  338. top: 100px;
  339. left: 57em;
  340. margin: 0px 2px 5px 5px;
  341. padding: 0px 2px 2px;
  342. max-width: 25em;
  343. word-wrap: break-word;
  344. .infobox {
  345. margin: 10px 0 10px;
  346. border: 1px solid #ddd;
  347. padding: 0.9em;
  348. font-size: 0.9em;
  349. box-shadow: 0px 0px 5px #CCC;
  350. h2 {
  351. margin: 0 0 .5em 0;
  352. }
  353. img {
  354. max-width: 100%;
  355. max-height: 12em;
  356. display: block;
  357. margin: 0;
  358. padding: 0;
  359. }
  360. dl {
  361. margin: 0.5em 0;
  362. }
  363. dt {
  364. display: inline;
  365. margin: 0.5em 0.25em 0.5em 0;
  366. padding: 0;
  367. font-weight: bold;
  368. }
  369. dd {
  370. display: inline;
  371. margin: 0.5em 0;
  372. padding: 0;
  373. }
  374. input {
  375. font-size: 1em;
  376. }
  377. br {
  378. clear: both;
  379. }
  380. .attributes, .urls {
  381. clear: both;
  382. }
  383. }
  384. }
  385. #search_url {
  386. margin-top: 8px;
  387. div {
  388. display: block;
  389. border: 1px solid @color-result-search-url-border;
  390. padding: 4px;
  391. color: @color-result-search-url-font;
  392. width: 100%;
  393. display: block;
  394. margin: 0.1em;
  395. overflow: hidden;
  396. height: 1.2em;
  397. line-height: 1.2em;
  398. pre {
  399. display: block;
  400. width: 200em;
  401. font-size: 0.8em;
  402. word-break: break-all;
  403. margin: 0.1em;
  404. .select-all-on-focus();
  405. }
  406. }
  407. }
  408. #linkto_preferences {
  409. position: absolute;
  410. right: 10px;
  411. top: 0.9em;
  412. padding: 0;
  413. border: 0;
  414. display: block;
  415. font-size: 1.2em;
  416. color: @color-search-font;
  417. a:link *, a:hover *, a:visited *, a:active * {
  418. color: @color-search-font;
  419. }
  420. }
  421. #pagination {
  422. clear: both;
  423. br {
  424. clear: both;
  425. }
  426. }
  427. #apis {
  428. margin-top: 8px;
  429. clear: both;
  430. }
  431. #backToTop {
  432. border: 1px solid #ddd;
  433. margin: 0 0 0 2em;
  434. padding: 0;
  435. font-size: 1em;
  436. box-shadow: 0px 0px 5px #CCC;
  437. background: white;
  438. position: fixed;
  439. bottom: 85px;
  440. left: @results-width;
  441. transition: opacity 0.5s;
  442. opacity: 0;
  443. a {
  444. display: block;
  445. margin: 0;
  446. padding: 0.6em;
  447. }
  448. }
  449. @media screen and (max-width: 75em) {
  450. #main_preferences, #main_about, #main_stats {
  451. margin: 0.5em;
  452. width: auto;
  453. }
  454. #suggestions, #answers {
  455. margin-top: 1em;
  456. }
  457. #infoboxes {
  458. position: inherit;
  459. max-width: inherit;
  460. .infobox {
  461. clear:both;
  462. img {
  463. float: left;
  464. max-width: 10em;
  465. margin: 0.5em 0.5em 0.5em 0;
  466. }
  467. }
  468. }
  469. #sidebar {
  470. position: static;
  471. max-width: @results-width;
  472. margin: 0 0 2px 0;
  473. padding: 0;
  474. float: none;
  475. border: none;
  476. width: auto;
  477. input {
  478. border: 0;
  479. }
  480. }
  481. #apis {
  482. display: none;
  483. }
  484. #search_url {
  485. display: none;
  486. }
  487. .result {
  488. border-bottom: 1px solid @color-result-top-border;
  489. margin: 0;
  490. padding-top: 8px;
  491. padding-bottom: 6px;
  492. h3 {
  493. margin: 0 0 1px 0;
  494. }
  495. .thumbnail {
  496. max-width: 98%;
  497. }
  498. .url {
  499. span.url {
  500. display: block;
  501. white-space: nowrap;
  502. text-overflow: ellipsis;
  503. overflow: hidden;
  504. width: 100%;
  505. }
  506. a {
  507. float: right;
  508. padding: 0 0.5em;
  509. }
  510. }
  511. .engines {
  512. float: right;
  513. padding: 0 0 3px 0;
  514. }
  515. }
  516. .result-images {
  517. border-bottom: none !important;
  518. }
  519. .image_result {
  520. max-width: 98%;
  521. img {
  522. max-width: 98%;
  523. }
  524. }
  525. }
  526. @media screen and (max-width: @results-width) {
  527. article[data-vim-selected]::before {
  528. display: none;
  529. content: "";
  530. }
  531. #linkto_preferences {
  532. display: none;
  533. postion: fixed !important;
  534. top: 100px;
  535. right: 0px;
  536. }
  537. #sidebar {
  538. margin: 0 5px 2px 5px;
  539. }
  540. #corrections {
  541. margin: 1em 5px 1em 5px;
  542. }
  543. #results {
  544. margin: 0;
  545. padding: 0;
  546. width: initial;
  547. }
  548. #backToTop {
  549. left: 40em;
  550. bottom: 35px;
  551. }
  552. .result {
  553. padding: 8px 10px 6px 10px;
  554. }
  555. .result-images {
  556. margin: 0;
  557. padding: 0;
  558. border: none;
  559. }
  560. }
  561. @media screen and (max-width: 35em) {
  562. .result-videos {
  563. img.thumbnail {
  564. float: none !important;
  565. }
  566. .content {
  567. overflow: inherit;
  568. }
  569. }
  570. }