style.less 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. /*
  2. * searx, A privacy-respecting, hackable metasearch engine
  3. *
  4. * To convert "style.less" to "style.css" run: $make styles
  5. */
  6. @import "definitions.less";
  7. @import "mixins.less";
  8. // Main LESS-Code
  9. html {
  10. font-family: sans-serif;
  11. font-size: 0.9em;
  12. .text-size-adjust;
  13. color: @color-font;
  14. padding: 0;
  15. margin: 0;
  16. }
  17. body, #container {
  18. padding: 0;
  19. margin: 0;
  20. }
  21. #container {
  22. width: 100%;
  23. position: absolute;
  24. top: 0;
  25. }
  26. .row {
  27. max-width: 800px;
  28. margin: 20px auto;
  29. text-align: justify;
  30. h1 {
  31. font-size: 3em;
  32. margin-top: 50px;
  33. }
  34. p {
  35. padding: 0 10px;
  36. max-width: 700px;
  37. }
  38. h3,ul {
  39. margin: 4px 8px;
  40. }
  41. }
  42. .hmarg {
  43. margin: 0 20px;
  44. border: 1px solid @color-hmarg-border;
  45. padding: 4px 10px;
  46. }
  47. a {
  48. &:link.hmarg {
  49. color: @color-hmarg-font;
  50. }
  51. &:visited.hmarg {
  52. color: @color-hmarg-font;
  53. }
  54. &:active.hmarg {
  55. color: @color-hmarg-font-hover;
  56. }
  57. &:hover.hmarg {
  58. color: @color-hmarg-font-hover;
  59. }
  60. }
  61. .top_margin {
  62. margin-top: 60px;
  63. }
  64. .center {
  65. text-align: center;
  66. }
  67. h1 {
  68. font-size: 5em;
  69. }
  70. div.title {
  71. background: url('static/img/searx.png') no-repeat;
  72. width: 100%;
  73. background-position: center;
  74. h1 {
  75. visibility: hidden;
  76. }
  77. }
  78. input[type="submit"] {
  79. padding: 2px 6px;
  80. margin: 2px 4px;
  81. display: inline-block;
  82. background: @color-download-button-background;
  83. color: @color-download-button-font;
  84. .rounded-corners;
  85. border: 0;
  86. cursor: pointer;
  87. }
  88. input[type="checkbox"] {
  89. visibility: hidden;
  90. }
  91. fieldset {
  92. margin: 8px;
  93. border: 1px solid @color-settings-fieldset;
  94. }
  95. #categories {
  96. margin: 0 10px;
  97. }
  98. .checkbox_container {
  99. display: inline-block;
  100. position: relative;
  101. margin: 0 3px;
  102. padding: 0px;
  103. input {
  104. display: none;
  105. }
  106. }
  107. .checkbox_container label, .engine_checkbox label {
  108. cursor: pointer;
  109. padding: 4px 10px;
  110. margin: 0;
  111. display: block;
  112. text-transform: capitalize;
  113. .user-select;
  114. }
  115. .checkbox_container input[type="checkbox"]:checked + label {
  116. background: @color-categories-item-selected;
  117. color: @color-categories-item-selected-font;
  118. }
  119. .search {
  120. .checkbox_container label {
  121. border-bottom: 4px solid @color-categories-item-border-unselected;
  122. }
  123. .checkbox_container label:hover {
  124. border-bottom: 4px solid @color-categories-item-border-unselected-hover;
  125. }
  126. .checkbox_container input[type="checkbox"]:checked + label {
  127. border-bottom: 4px solid @color-categories-item-border-selected;
  128. }
  129. }
  130. .engine_checkbox {
  131. padding: 4px;
  132. }
  133. label {
  134. &.allow {
  135. background: @color-settings-label-allowed-background;
  136. padding: 4px 8px;
  137. color: @color-settings-label-allowed-font;
  138. display: none;
  139. }
  140. &.deny {
  141. background: @color-settings-label-deny-background;
  142. padding: 4px 8px;
  143. color: @color-settings-label-deny-font;
  144. display: inline;
  145. }
  146. }
  147. .engine_checkbox input[type="checkbox"]:checked + label {
  148. &:nth-child(2) + label {
  149. display: none;
  150. }
  151. &.allow {
  152. display: inline;
  153. }
  154. }
  155. a {
  156. text-decoration: none;
  157. color: @color-url-font;
  158. &:visited {
  159. color: @color-url-visited-font;
  160. }
  161. }
  162. .result {
  163. margin: 19px 0 18px 0;
  164. padding: 0;
  165. max-width: 53em;
  166. clear: both;
  167. }
  168. .result_title {
  169. margin-bottom: 0;
  170. a {
  171. color: @color-result-link-font;
  172. font-weight: normal;
  173. font-size: 1.1em;
  174. &:hover {
  175. text-decoration: underline;
  176. }
  177. &:visited {
  178. color: @color-result-link-visited-font;
  179. }
  180. }
  181. }
  182. .result {
  183. h3 {
  184. font-size: 1em;
  185. word-wrap:break-word;
  186. margin: 5px 0 1px 0;
  187. padding: 0
  188. }
  189. .content {
  190. font-size: 0.8em;
  191. margin: 0;
  192. padding: 0;
  193. max-width: 54em;
  194. word-wrap:break-word;
  195. line-height: 1.24;
  196. }
  197. .url {
  198. font-size: 0.8em;
  199. margin: 3px 0 0 0;
  200. padding: 0;
  201. max-width: 54em;
  202. word-wrap:break-word;
  203. color: @color-result-url-font;
  204. }
  205. .published_date {
  206. font-size: 0.8em;
  207. color: @color-result-publishdate-font;
  208. margin: 5px 20px;
  209. }
  210. }
  211. .engines {
  212. color: @color-engines-font;
  213. }
  214. .small_font {
  215. font-size: 0.8em;
  216. }
  217. .small p {
  218. margin: 2px 0;
  219. }
  220. .search {
  221. background: @color-result-search-background;
  222. padding: 0;
  223. margin: 0
  224. }
  225. .right {
  226. float: right;
  227. }
  228. .invisible {
  229. display: none;
  230. }
  231. .left {
  232. float: left;
  233. }
  234. .image_result {
  235. float: left;
  236. margin: 10px 10px;
  237. position: relative;
  238. height: 160px;
  239. img {
  240. border: 0;
  241. height: 160px;
  242. }
  243. p {
  244. margin: 0;
  245. padding: 0;
  246. span a {
  247. display: none;
  248. color: @color-result-image-span-font;
  249. }
  250. &:hover span a {
  251. display: block;
  252. position: absolute;
  253. bottom: 0;
  254. right: 0;
  255. padding: 4px;
  256. background-color: @color-result-image-span-background-hover;
  257. font-size: 0.7em;
  258. }
  259. }
  260. }
  261. .torrent_result {
  262. border-left: 10px solid @color-result-torrent-border;
  263. padding-left: 3px;
  264. p {
  265. margin: 3px;
  266. font-size: 0.8em;
  267. }
  268. }
  269. .definition_result {
  270. border-left: 10px solid @color-result-definition-border;
  271. padding-left: 3px;
  272. }
  273. .percentage {
  274. position: relative;
  275. width: 300px;
  276. div {
  277. background: @color-percentage-div-background;
  278. }
  279. }
  280. table {
  281. width: 100%;
  282. }
  283. td {
  284. padding: 0 4px;
  285. }
  286. tr {
  287. &:hover {
  288. background: @color-settings-tr-hover;
  289. }
  290. }
  291. #search_wrapper {
  292. position: relative;
  293. max-width: 600px;
  294. padding: 10px;
  295. }
  296. .center #search_wrapper {
  297. margin-left: auto;
  298. margin-right: auto;
  299. }
  300. .q {
  301. background: none repeat scroll 0 0 @color-search-background;
  302. border: 1px solid @color-search-border;
  303. color: @color-search-font;
  304. font-size: 16px;
  305. height: 28px;
  306. margin: 0;
  307. outline: medium none;
  308. padding: 2px;
  309. padding-left: 8px;
  310. padding-right: 0px !important;
  311. width: 100%;
  312. z-index: 2;
  313. }
  314. #search_submit {
  315. position: absolute;
  316. top: 13px;
  317. right: 1px;
  318. padding: 0;
  319. border: 0;
  320. background: url('static/img/search-icon.png') no-repeat;
  321. background-size: 24px 24px;
  322. opacity: 0.8;
  323. width: 24px;
  324. height: 30px;
  325. font-size: 0;
  326. }
  327. #results {
  328. margin: 10px;
  329. padding: 0;
  330. margin-bottom: 20px;
  331. }
  332. #sidebar {
  333. position: absolute;
  334. left: 54em;
  335. width: 15em;
  336. margin: 0 2px 5px 5px;
  337. padding: 0 2px 2px 2px;
  338. }
  339. #suggestions {
  340. span {
  341. display: block;
  342. margin: 0 2px 2px 2px;
  343. padding: 0;
  344. }
  345. form {
  346. display: block;
  347. }
  348. input {
  349. padding: 2px 6px;
  350. margin: 2px 4px;
  351. font-size: 0.8em;
  352. display: inline-block;
  353. background: @color-suggestions-button-background;
  354. color: @color-suggestions-button-font;
  355. .rounded-corners;
  356. border: 0;
  357. cursor: pointer;
  358. }
  359. }
  360. #search_url {
  361. margin-top: 8px;
  362. input {
  363. border: 1px solid @color-result-search-url-border;
  364. padding: 4px;
  365. color: @color-result-search-url-font;
  366. width: 20em;
  367. display: block;
  368. margin: 4px;
  369. }
  370. }
  371. #preferences {
  372. top: 10px;
  373. padding: 0;
  374. border: 0;
  375. background: url('static/img/preference-icon.png') no-repeat;
  376. background-size: 28px 28px;
  377. opacity: 0.8;
  378. width: 28px;
  379. height: 30px;
  380. display: block;
  381. * {
  382. display: none;
  383. }
  384. }
  385. #pagination {
  386. clear: both;
  387. }
  388. #apis {
  389. margin-top: 8px;
  390. clear: both;
  391. }
  392. @media screen and (max-width: 60em) {
  393. #sidebar {
  394. position: static;
  395. max-width: 50em;
  396. margin: 0 0 2px 0;
  397. padding: 0;
  398. float: none;
  399. border: none;
  400. width: auto
  401. }
  402. #suggestions {
  403. span {
  404. display: inline;
  405. font-size: 0.8em
  406. }
  407. form {
  408. display: inline;
  409. }
  410. input {
  411. padding: 2px 6px;
  412. margin: 2px 4px;
  413. font-size: 0.8em;
  414. display: inline-block;
  415. .rounded-corners;
  416. border: 0;
  417. cursor: pointer;
  418. }
  419. }
  420. }
  421. @media screen and (max-width: 680px) {
  422. #search_wrapper {
  423. width: 90%;
  424. clear:both;
  425. overflow: hidden
  426. }
  427. .right {
  428. display: none;
  429. postion: fixed !important;
  430. top: 100px;
  431. right: 0px;
  432. }
  433. #apis {
  434. display: none;
  435. }
  436. #categories {
  437. font-size: 80%;
  438. clear: both;
  439. .checkbox_container {
  440. margin-top: 2px;
  441. margin: 0 2px;
  442. }
  443. }
  444. .checkbox_container {
  445. display: block;
  446. width: 100%;
  447. //float: left;
  448. label {
  449. border-bottom: 0;
  450. }
  451. }
  452. .result {
  453. border-top: 1px solid @color-result-top-border;
  454. margin: 7px 0 6px 0;
  455. img {
  456. max-width: 90%;
  457. width: auto;
  458. height: auto
  459. }
  460. }
  461. }
  462. .favicon {
  463. float: left;
  464. margin-right: 4px;
  465. margin-top: 2px;
  466. }
  467. .preferences_back {
  468. background: none repeat scroll 0 0 @color-settings-return-background;
  469. border: 0 none;
  470. .rounded-corners;
  471. cursor: pointer;
  472. display: inline-block;
  473. margin: 2px 4px;
  474. padding: 4px 6px;
  475. a {
  476. color: @color-settings-return-font;
  477. }
  478. }