style.less 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  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: 55em;
  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. }
  206. .engines {
  207. color: @color-engines-font;
  208. }
  209. .small_font {
  210. font-size: 0.8em;
  211. }
  212. .small p {
  213. margin: 2px 0;
  214. }
  215. .search {
  216. background: @color-result-search-background;
  217. padding: 0;
  218. margin: 0
  219. }
  220. .right {
  221. float: right;
  222. }
  223. .invisible {
  224. display: none;
  225. }
  226. .left {
  227. float: left;
  228. }
  229. .image_result {
  230. float: left;
  231. margin: 10px 10px;
  232. position: relative;
  233. height: 160px;
  234. img {
  235. border: 0;
  236. height: 160px;
  237. }
  238. p {
  239. margin: 0;
  240. padding: 0;
  241. span a {
  242. display: none;
  243. color: @color-result-image-span-font;
  244. }
  245. &:hover span a {
  246. display: block;
  247. position: absolute;
  248. bottom: 0;
  249. right: 0;
  250. padding: 4px;
  251. background-color: @color-result-image-span-background-hover;
  252. font-size: 0.7em;
  253. }
  254. }
  255. }
  256. .torrent_result {
  257. border-left: 10px solid @color-result-torrent-border;
  258. padding-left: 3px;
  259. p {
  260. margin: 3px;
  261. font-size: 0.8em;
  262. }
  263. }
  264. .definition_result {
  265. border-left: 10px solid @color-result-definition-border;
  266. padding-left: 3px;
  267. }
  268. .percentage {
  269. position: relative;
  270. width: 300px;
  271. div {
  272. background: @color-percentage-div-background;
  273. }
  274. }
  275. table {
  276. width: 100%;
  277. }
  278. td {
  279. padding: 0 4px;
  280. }
  281. tr {
  282. &:hover {
  283. background: @color-settings-tr-hover;
  284. }
  285. }
  286. #search_wrapper {
  287. position: relative;
  288. max-width: 600px;
  289. padding: 10px;
  290. }
  291. .center #search_wrapper {
  292. margin-left: auto;
  293. margin-right: auto;
  294. }
  295. .q {
  296. background: none repeat scroll 0 0 @color-search-background;
  297. border: 1px solid @color-search-border;
  298. color: @color-search-font;
  299. font-size: 16px;
  300. height: 28px;
  301. margin: 0;
  302. outline: medium none;
  303. padding: 2px;
  304. padding-left: 8px;
  305. padding-right: 0px !important;
  306. width: 100%;
  307. z-index: 2;
  308. }
  309. #search_submit {
  310. position: absolute;
  311. top: 13px;
  312. right: 1px;
  313. padding: 0;
  314. border: 0;
  315. background: url('/static/img/search-icon.png') no-repeat;
  316. background-size: 24px 24px;
  317. opacity: 0.8;
  318. width: 24px;
  319. height: 30px;
  320. font-size: 0;
  321. }
  322. #results {
  323. margin: 10px;
  324. padding: 0;
  325. margin-bottom: 20px;
  326. }
  327. #sidebar {
  328. position: absolute;
  329. left: 54em;
  330. width: 15em;
  331. margin: 0 2px 5px 5px;
  332. padding: 0 2px 2px 2px;
  333. }
  334. #suggestions {
  335. span {
  336. display: block;
  337. margin: 0 2px 2px 2px;
  338. padding: 0;
  339. }
  340. form {
  341. display: block;
  342. }
  343. input {
  344. padding: 2px 6px;
  345. margin: 2px 4px;
  346. font-size: 0.8em;
  347. display: inline-block;
  348. background: @color-suggestions-button-background;
  349. color: @color-suggestions-button-font;
  350. .rounded-corners;
  351. border: 0;
  352. cursor: pointer;
  353. }
  354. }
  355. #search_url {
  356. margin-top: 8px;
  357. input {
  358. border: 1px solid @color-result-search-url-border;
  359. padding: 4px;
  360. color: @color-result-search-url-font;
  361. width: 20em;
  362. display: block;
  363. margin: 4px;
  364. }
  365. }
  366. #preferences {
  367. top: 10px;
  368. padding: 0;
  369. border: 0;
  370. background: url('/static/img/preference-icon.png') no-repeat;
  371. background-size: 28px 28px;
  372. opacity: 0.8;
  373. width: 28px;
  374. height: 30px;
  375. display: block;
  376. * {
  377. display: none;
  378. }
  379. }
  380. #pagination {
  381. clear: both;
  382. }
  383. #apis {
  384. margin-top: 8px;
  385. clear: both;
  386. }
  387. @media screen and (max-width: 60em) {
  388. #sidebar {
  389. position: static;
  390. max-width: 50em;
  391. margin: 0 0 2px 0;
  392. padding: 0;
  393. float: none;
  394. border: none;
  395. width: auto
  396. }
  397. #suggestions {
  398. span {
  399. display: inline;
  400. font-size: 0.8em
  401. }
  402. form {
  403. display: inline;
  404. }
  405. input {
  406. padding: 2px 6px;
  407. margin: 2px 4px;
  408. font-size: 0.8em;
  409. display: inline-block;
  410. .rounded-corners;
  411. border: 0;
  412. cursor: pointer;
  413. }
  414. }
  415. }
  416. @media screen and (max-width: 680px) {
  417. #search_wrapper {
  418. width: 90%;
  419. clear:both;
  420. overflow: hidden
  421. }
  422. .right {
  423. display: none;
  424. postion: fixed !important;
  425. top: 100px;
  426. right: 0px;
  427. }
  428. #apis {
  429. display: none;
  430. }
  431. #categories {
  432. font-size: 80%;
  433. clear: both;
  434. .checkbox_container {
  435. margin-top: 2px;
  436. margin: 0 2px;
  437. }
  438. }
  439. .checkbox_container {
  440. display: block;
  441. width: 100%;
  442. //float: left;
  443. label {
  444. border-bottom: 0;
  445. }
  446. }
  447. .result {
  448. border-top: 1px solid @color-result-top-border;
  449. margin: 7px 0 6px 0;
  450. img {
  451. max-width: 90%;
  452. width: auto;
  453. height: auto
  454. }
  455. }
  456. }
  457. .favicon {
  458. float: left;
  459. margin-right: 4px;
  460. margin-top: 2px;
  461. }
  462. .preferences_back {
  463. background: none repeat scroll 0 0 @color-settings-return-background;
  464. border: 0 none;
  465. .rounded-corners;
  466. cursor: pointer;
  467. display: inline-block;
  468. margin: 2px 4px;
  469. padding: 4px 6px;
  470. a {
  471. color: @color-settings-return-font;
  472. }
  473. }