style.less 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140
  1. /*
  2. * SearXNG, A privacy-respecting, hackable metasearch engine
  3. *
  4. * To convert "style.less" to "style.css" run: $make styles
  5. */
  6. // stylelint-disable no-descending-specificity
  7. @import (inline) "../../node_modules/normalize.css/normalize.css";
  8. @import "definitions.less";
  9. @import "mixins.less";
  10. @import "code.less";
  11. @import "toolkit.less";
  12. @import "autocomplete.less";
  13. @import "detail.less";
  14. @import "animations.less";
  15. @import "embedded.less";
  16. @import "info.less";
  17. @import "new_issue.less";
  18. @import "stats.less";
  19. @import "result_templates.less";
  20. // for index.html template
  21. @import "index.less";
  22. // for preferences.html template
  23. @import "preferences.less";
  24. // Search-Field
  25. @import "search.less";
  26. // to center the results
  27. @import "style-center.less";
  28. // ion-icon
  29. .ion-icon {
  30. display: inline-block;
  31. vertical-align: bottom;
  32. line-height: 1;
  33. text-decoration: inherit;
  34. .ltr-transform();
  35. }
  36. .ion-icon-small {
  37. width: 1rem;
  38. height: 1rem;
  39. .ion-icon;
  40. }
  41. .ion-icon-big {
  42. width: 1.5rem;
  43. height: 1.5rem;
  44. .ion-icon;
  45. }
  46. // Main LESS-Code
  47. html {
  48. font-family: sans-serif;
  49. font-size: 0.9em;
  50. .text-size-adjust;
  51. color: var(--color-base-font);
  52. background-color: var(--color-base-background);
  53. padding: 0;
  54. margin: 0;
  55. scroll-behavior: smooth;
  56. }
  57. body,
  58. main {
  59. padding: 0;
  60. margin: 0;
  61. }
  62. body {
  63. display: flex;
  64. flex-direction: column;
  65. height: 100vh;
  66. margin: 0;
  67. }
  68. main {
  69. width: 100%;
  70. margin-bottom: 2rem;
  71. flex: 1;
  72. }
  73. .page_with_header {
  74. margin: 2em auto;
  75. width: 85em;
  76. }
  77. footer {
  78. clear: both;
  79. min-height: 4rem;
  80. padding: 1rem 0;
  81. width: 100%;
  82. text-align: center;
  83. background-color: var(--color-footer-background);
  84. border-top: 1px solid var(--color-footer-border);
  85. overflow: hidden;
  86. p {
  87. font-size: 0.9em;
  88. }
  89. }
  90. .page_with_header .logo {
  91. height: 40px;
  92. }
  93. input[type="submit"],
  94. #results button[type="submit"],
  95. .button {
  96. padding: 0.7rem;
  97. display: inline-block;
  98. background: var(--color-btn-background);
  99. color: var(--color-btn-font);
  100. .rounded-corners;
  101. border: 0;
  102. cursor: pointer;
  103. }
  104. a {
  105. text-decoration: none;
  106. color: var(--color-url-font);
  107. &:visited {
  108. color: var(--color-url-visited-font);
  109. .highlight {
  110. color: var(--color-url-visited-font);
  111. }
  112. }
  113. }
  114. article[data-vim-selected] {
  115. background: var(--color-result-vim-selected);
  116. .ltr-border-left(0.2rem solid var(--color-result-vim-arrow));
  117. .ltr-rounded-right-corners(10px);
  118. }
  119. article.result-images[data-vim-selected] {
  120. background: var(--color-result-vim-arrow);
  121. border: none;
  122. .rounded-corners;
  123. .image_thumbnail {
  124. filter: opacity(60%);
  125. }
  126. span.title,
  127. span.source {
  128. color: var(--color-result-image-span-font-selected);
  129. }
  130. }
  131. article[data-vim-selected].category-videos,
  132. article[data-vim-selected].category-news,
  133. article[data-vim-selected].category-map,
  134. article[data-vim-selected].category-music,
  135. article[data-vim-selected].category-files,
  136. article[data-vim-selected].category-social {
  137. border: 1px solid var(--color-result-vim-arrow);
  138. .rounded-corners;
  139. }
  140. .result {
  141. margin: @results-margin 0;
  142. padding: @result-padding;
  143. .ltr-border-left(0.2rem solid transparent);
  144. h3 {
  145. font-size: 1.2rem;
  146. word-wrap: break-word;
  147. margin: 0.4rem 0 0.4rem 0;
  148. padding: 0;
  149. a {
  150. color: var(--color-result-link-font);
  151. font-weight: normal;
  152. font-size: 1.1em;
  153. &:visited {
  154. color: var(--color-result-link-visited-font);
  155. }
  156. &:focus,
  157. &:hover {
  158. text-decoration: underline;
  159. border: none;
  160. outline: none;
  161. }
  162. }
  163. }
  164. .cache_link,
  165. .proxyfied_link {
  166. font-size: smaller !important;
  167. margin-left: 0.5rem;
  168. }
  169. .content,
  170. .stat {
  171. font-size: 0.9em;
  172. margin: 0;
  173. padding: 0;
  174. max-width: 54em;
  175. word-wrap: break-word;
  176. line-height: 1.24;
  177. .highlight {
  178. color: var(--color-result-description-highlight-font);
  179. background: inherit;
  180. font-weight: bold;
  181. }
  182. }
  183. .altlink a {
  184. font-size: 0.9em;
  185. margin: 0 10px 0 0;
  186. .show-content-button;
  187. }
  188. .codelines {
  189. .highlight {
  190. color: inherit;
  191. background: inherit;
  192. font-weight: normal;
  193. }
  194. }
  195. .url_wrapper {
  196. display: flex;
  197. font-size: 1rem;
  198. color: var(--color-result-url-font);
  199. flex-wrap: nowrap;
  200. overflow: hidden;
  201. flex-direction: row;
  202. margin: 0;
  203. padding: 0;
  204. .url_o1 {
  205. white-space: nowrap;
  206. flex-shrink: 1;
  207. padding-bottom: 1px;
  208. }
  209. .url_o1::after {
  210. content: " ";
  211. width: 1ch;
  212. display: inline-block;
  213. }
  214. .url_o2 {
  215. overflow: hidden;
  216. white-space: nowrap;
  217. flex-basis: content;
  218. flex-grow: 0;
  219. flex-shrink: 1;
  220. text-align: right;
  221. padding-bottom: 1px;
  222. .url_i2 {
  223. float: right;
  224. }
  225. }
  226. }
  227. .published_date,
  228. .result_length,
  229. .result_views,
  230. .result_author,
  231. .result_shipping,
  232. .result_source_country {
  233. font-size: 0.8em;
  234. color: var(--color-result-publishdate-font);
  235. }
  236. .result_price {
  237. font-size: 1.2em;
  238. color: var(--color-result-description-highlight-font);
  239. }
  240. img.thumbnail {
  241. .ltr-float-left();
  242. padding-top: 0.6rem;
  243. .ltr-padding-right(1rem);
  244. width: 7rem;
  245. height: unset; // remove heigth value that was needed for lazy loading
  246. }
  247. .break {
  248. clear: both;
  249. }
  250. }
  251. .result-paper,
  252. .result-packages {
  253. .attributes {
  254. display: table;
  255. border-spacing: 0.125rem;
  256. div {
  257. display: table-row;
  258. span {
  259. font-size: 0.9rem;
  260. margin-top: 0.25rem;
  261. display: table-cell;
  262. time {
  263. font-size: 0.9rem;
  264. }
  265. }
  266. span:first-child {
  267. color: var(--color-base-font);
  268. min-width: 10rem;
  269. }
  270. span:nth-child(2) {
  271. color: var(--color-result-publishdate-font);
  272. }
  273. }
  274. }
  275. .content {
  276. margin-top: 0.25rem;
  277. }
  278. .comments {
  279. font-size: 0.9rem;
  280. margin: 0.25rem 0 0 0;
  281. padding: 0;
  282. word-wrap: break-word;
  283. line-height: 1.24;
  284. font-style: italic;
  285. }
  286. }
  287. .result-packages {
  288. .attributes {
  289. margin-top: 0.3rem;
  290. }
  291. }
  292. .template_group_images {
  293. display: flex;
  294. flex-wrap: wrap;
  295. }
  296. .template_group_images::after {
  297. flex-grow: 10;
  298. content: "";
  299. }
  300. .category-videos,
  301. .category-news,
  302. .category-map,
  303. .category-music,
  304. .category-files,
  305. .category-social {
  306. border: 1px solid var(--color-result-border);
  307. margin: 0 @results-tablet-offset 1rem @results-tablet-offset !important;
  308. .rounded-corners;
  309. }
  310. .category-social .image {
  311. width: auto !important;
  312. min-width: 48px;
  313. min-height: 48px;
  314. padding: 0 5px 25px 0 !important;
  315. }
  316. .audio-control audio {
  317. width: 100%;
  318. padding: 10px 0 0 0;
  319. }
  320. .embedded-content iframe {
  321. width: 100%;
  322. padding: 10px 0 0 0;
  323. }
  324. .result-videos {
  325. img.thumbnail {
  326. .ltr-float-left();
  327. padding-top: 0.6rem;
  328. .ltr-padding-right(1rem);
  329. width: 20rem;
  330. height: unset; // remove heigth value that was needed for lazy loading
  331. }
  332. }
  333. .result-videos .content {
  334. overflow: hidden;
  335. }
  336. .result-videos .embedded-video iframe {
  337. width: 100%;
  338. aspect-ratio: 16 / 9;
  339. padding: 10px 0 0 0;
  340. }
  341. @supports not (aspect-ratio: 1 / 1) {
  342. // support older browsers which do not have aspect-ratio
  343. // https://caniuse.com/?search=aspect-ratio
  344. .result-videos .embedded-video iframe {
  345. height: calc(@results-width * 9 / 16);
  346. }
  347. }
  348. .engines {
  349. .ltr-float-right();
  350. display: flex;
  351. flex-wrap: wrap;
  352. justify-content: flex-end;
  353. color: var(--color-result-engines-font);
  354. span {
  355. font-size: smaller;
  356. margin-top: 0;
  357. margin-bottom: 0;
  358. .ltr-margin-right(0.5rem);
  359. .ltr-margin-left(0);
  360. }
  361. }
  362. .small_font {
  363. font-size: 0.8em;
  364. }
  365. .highlight {
  366. color: var(--color-result-link-font-highlight);
  367. background: inherit;
  368. }
  369. .empty_element {
  370. font-style: italic;
  371. }
  372. .result-images {
  373. flex-grow: 1;
  374. padding: 0.5rem 0.5rem 3rem 0.5rem;
  375. margin: 0.25rem;
  376. border: none !important;
  377. height: @results-image-row-height;
  378. & > a {
  379. position: relative;
  380. outline: none;
  381. }
  382. img {
  383. margin: 0;
  384. padding: 0;
  385. border: none;
  386. height: 100%;
  387. width: 100%;
  388. object-fit: cover;
  389. vertical-align: bottom;
  390. background: var(--color-result-image-background);
  391. }
  392. .image_resolution {
  393. position: absolute;
  394. right: 0;
  395. bottom: 0;
  396. background: rgba(0, 0, 0, 50%);
  397. padding: 0.3rem 0.5rem;
  398. font-size: 0.9rem;
  399. color: #fff;
  400. border-top-left-radius: 0.3rem;
  401. }
  402. span.title,
  403. span.source {
  404. display: block;
  405. position: absolute;
  406. width: 100%;
  407. font-size: 0.9rem;
  408. color: var(--color-result-image-span-font);
  409. padding: 0.5rem 0 0 0;
  410. overflow: hidden;
  411. text-overflow: ellipsis;
  412. white-space: nowrap;
  413. }
  414. span.source {
  415. padding: 1.8rem 0 0 0;
  416. font-size: 0.7rem;
  417. }
  418. }
  419. .result-map {
  420. img.image {
  421. .ltr-float-right() !important;
  422. height: 100px !important;
  423. width: auto !important;
  424. }
  425. table {
  426. font-size: 0.9em;
  427. width: auto;
  428. border-collapse: separate;
  429. border-spacing: 0 0.35rem;
  430. th {
  431. font-weight: inherit;
  432. width: 17rem;
  433. vertical-align: top;
  434. .ltr-text-align-left();
  435. }
  436. td {
  437. vertical-align: top;
  438. .ltr-text-align-left();
  439. }
  440. }
  441. }
  442. .hidden {
  443. display: none !important;
  444. }
  445. #results {
  446. margin-top: 1rem;
  447. .ltr-margin-right(2rem);
  448. margin-bottom: 0;
  449. .ltr-margin-left(@results-offset);
  450. display: grid;
  451. grid-template-columns: @results-width @results-sidebar-width;
  452. grid-template-rows: min-content min-content 1fr min-content;
  453. gap: 0 @results-gap;
  454. grid-template-areas:
  455. "corrections sidebar"
  456. "answers sidebar"
  457. "urls sidebar"
  458. "pagination sidebar";
  459. }
  460. #results #sidebar *:first-child {
  461. margin-top: 0;
  462. }
  463. #urls {
  464. padding: 0;
  465. grid-area: urls;
  466. }
  467. #apis .wrapper {
  468. display: flex;
  469. }
  470. #suggestions {
  471. .wrapper {
  472. display: flex;
  473. flex-flow: column;
  474. justify-content: flex-end;
  475. form {
  476. display: inline-block;
  477. flex: 1 1 50%;
  478. }
  479. }
  480. }
  481. #suggestions,
  482. #infoboxes {
  483. input {
  484. padding: 0;
  485. margin: 3px;
  486. font-size: 0.9em;
  487. display: inline-block;
  488. background: transparent;
  489. color: var(--color-result-search-url-font);
  490. cursor: pointer;
  491. width: calc(100%);
  492. text-overflow: ellipsis;
  493. overflow: hidden;
  494. text-align: left;
  495. }
  496. input[type="submit"],
  497. .infobox .url a {
  498. color: var(--color-result-link-font);
  499. text-decoration: none;
  500. font-size: 0.9rem;
  501. &:hover {
  502. text-decoration: underline;
  503. }
  504. }
  505. }
  506. #corrections {
  507. grid-area: corrections;
  508. display: flex;
  509. flex-flow: row wrap;
  510. margin: 0 0 1em 0;
  511. h4,
  512. input[type="submit"] {
  513. display: inline-block;
  514. padding: 0.5rem;
  515. margin: 0.5rem;
  516. }
  517. input[type="submit"] {
  518. font-size: 0.8rem;
  519. .rounded-corners-tiny;
  520. }
  521. }
  522. #infoboxes .title,
  523. #suggestions .title,
  524. #search_url .title,
  525. #engines_msg .title,
  526. #apis .title {
  527. margin: 2em 0 0.5em 0;
  528. color: var(--color-base-font);
  529. }
  530. summary.title {
  531. cursor: pointer;
  532. padding-top: 1em;
  533. }
  534. .sidebar-collapsable {
  535. border-top: 1px solid var(--color-sidebar-border);
  536. padding-bottom: 0.5em;
  537. }
  538. #sidebar-end-collapsable {
  539. border-bottom: 1px solid var(--color-sidebar-border);
  540. width: 100%;
  541. }
  542. #answers {
  543. grid-area: answers;
  544. background: var(--color-answer-background);
  545. padding: @result-padding;
  546. margin: 1rem 0;
  547. margin-top: 0;
  548. color: var(--color-answer-font);
  549. .rounded-corners;
  550. h4 {
  551. display: none;
  552. }
  553. span {
  554. overflow-wrap: anywhere;
  555. }
  556. .answer {
  557. display: flex;
  558. flex-direction: column;
  559. }
  560. .answer-url {
  561. margin-left: auto;
  562. margin-top: 5px;
  563. margin-right: 10px;
  564. margin-bottom: 10px;
  565. }
  566. }
  567. #infoboxes {
  568. form {
  569. min-width: 210px;
  570. }
  571. }
  572. #sidebar {
  573. grid-area: sidebar;
  574. word-wrap: break-word;
  575. color: var(--color-sidebar-font);
  576. .infobox {
  577. margin: 10px 0 10px;
  578. border: 1px solid var(--color-sidebar-border);
  579. padding: 1rem;
  580. font-size: 0.9em;
  581. .rounded-corners;
  582. h2 {
  583. margin: 0 0 0.5em 0;
  584. }
  585. img {
  586. max-width: 100%;
  587. max-height: 12em;
  588. display: block;
  589. margin: 0 auto;
  590. padding: 0;
  591. }
  592. dt {
  593. font-weight: bold;
  594. }
  595. .attributes {
  596. dl {
  597. margin: 0.5em 0;
  598. }
  599. dt {
  600. display: inline;
  601. margin-top: 0.5em;
  602. .ltr-margin-right(0.25em);
  603. margin-bottom: 0.5em;
  604. .ltr-margin-left(0);
  605. padding: 0;
  606. }
  607. dd {
  608. display: inline;
  609. margin: 0.5em 0;
  610. padding: 0;
  611. }
  612. }
  613. input {
  614. font-size: 1em;
  615. }
  616. br {
  617. clear: both;
  618. }
  619. .attributes,
  620. .urls {
  621. clear: both;
  622. }
  623. }
  624. }
  625. #apis {
  626. input {
  627. font-size: 0.9em;
  628. margin: 0 10px 0 0;
  629. .show-content-button;
  630. }
  631. }
  632. #search_url {
  633. div.selectable_url {
  634. pre {
  635. float: left;
  636. width: 200em;
  637. }
  638. }
  639. button#copy_url {
  640. float: right;
  641. padding: 0.4rem;
  642. margin-left: 0.5rem;
  643. border-radius: 0.3rem;
  644. display: none; // will be shown by JS.
  645. }
  646. }
  647. #links_on_top {
  648. position: absolute;
  649. .ltr-right(1rem);
  650. .ltr-text-align-right();
  651. top: 2.7rem;
  652. padding: 0;
  653. border: 0;
  654. display: flex;
  655. align-items: center;
  656. font-size: 1em;
  657. color: var(--color-search-font);
  658. a {
  659. display: flex;
  660. align-items: center;
  661. margin-left: 1em;
  662. svg {
  663. font-size: 1.2em;
  664. .ltr-margin-right(0.125em);
  665. }
  666. }
  667. a,
  668. a:link *,
  669. a:hover *,
  670. a:visited *,
  671. a:active * {
  672. color: var(--color-search-font);
  673. }
  674. }
  675. #pagination {
  676. grid-area: pagination;
  677. br {
  678. clear: both;
  679. }
  680. }
  681. .numbered_pagination {
  682. display: flex;
  683. flex-direction: row;
  684. justify-content: center;
  685. align-items: center;
  686. overflow: hidden;
  687. }
  688. .page_number {
  689. background: transparent !important;
  690. color: var(--color-result-link-font) !important;
  691. text-decoration: underline;
  692. }
  693. .page_number_current {
  694. background: transparent;
  695. color: var(--color-result-link-visited-font);
  696. border: none;
  697. }
  698. #backToTop {
  699. border: 1px solid var(--color-backtotop-border);
  700. margin: 0;
  701. padding: 0;
  702. font-size: 1em;
  703. background: var(--color-backtotop-background);
  704. position: fixed;
  705. bottom: 8rem;
  706. .ltr-left(@results-width + @results-offset + (0.5 * @results-gap - 1.2em));
  707. transition: opacity 0.5s;
  708. opacity: 0;
  709. pointer-events: none;
  710. .rounded-corners;
  711. a {
  712. display: block;
  713. margin: 0;
  714. padding: 0.7em;
  715. }
  716. a,
  717. a:visited,
  718. a:hover,
  719. a:active {
  720. color: var(--color-backtotop-font);
  721. }
  722. }
  723. #results.scrolling #backToTop {
  724. opacity: 1;
  725. pointer-events: all;
  726. }
  727. /*
  728. tablet layout
  729. */
  730. .results-tablet() {
  731. #links_on_top {
  732. span {
  733. display: none;
  734. }
  735. }
  736. .page_with_header {
  737. margin: 2rem 0.5rem;
  738. width: auto;
  739. }
  740. #infoboxes {
  741. position: inherit;
  742. max-width: inherit;
  743. .infobox {
  744. clear: both;
  745. img {
  746. .ltr-float-left();
  747. max-width: 10em;
  748. margin-top: 0.5em;
  749. .ltr-margin-right(0.5em);
  750. margin-bottom: 0.5em;
  751. .ltr-margin-left(0);
  752. }
  753. }
  754. }
  755. #sidebar {
  756. margin: 0 @results-tablet-offset @results-margin @results-tablet-offset;
  757. padding: 0;
  758. float: none;
  759. border: none;
  760. width: auto;
  761. input {
  762. border: 0;
  763. }
  764. }
  765. .result {
  766. .thumbnail {
  767. max-width: 98%;
  768. }
  769. .url {
  770. span.url {
  771. display: block;
  772. white-space: nowrap;
  773. text-overflow: ellipsis;
  774. overflow: hidden;
  775. width: 100%;
  776. }
  777. }
  778. .engines {
  779. .ltr-float-right();
  780. display: flex;
  781. flex-wrap: wrap;
  782. justify-content: flex-end;
  783. padding: 3px 0 0 0;
  784. }
  785. }
  786. .result-images {
  787. border-bottom: none !important;
  788. }
  789. .image_result {
  790. max-width: 98%;
  791. img {
  792. max-width: 98%;
  793. }
  794. }
  795. #backToTop {
  796. display: none;
  797. }
  798. #pagination {
  799. margin: 2rem 0 0 0 !important;
  800. }
  801. #main_results div#results {
  802. margin: 0 auto;
  803. justify-content: center;
  804. display: grid;
  805. grid-template-columns: @results-width;
  806. grid-template-rows: min-content min-content min-content 1fr min-content min-content;
  807. gap: 0;
  808. grid-template-areas:
  809. "corrections"
  810. "answers"
  811. "sidebar"
  812. "urls"
  813. "pagination";
  814. }
  815. }
  816. @media screen and (max-width: calc(@tablet - 0.5px)) {
  817. #links_on_top {
  818. span {
  819. display: none;
  820. }
  821. }
  822. }
  823. @media screen and (max-width: 52rem) {
  824. body.results_endpoint {
  825. #links_on_top {
  826. .link_on_top_about,
  827. .link_on_top_donate {
  828. display: none;
  829. }
  830. }
  831. }
  832. }
  833. @media screen and (min-width: @phone) and (max-width: @tablet) {
  834. // when .center-aligment-yes, see style-center.less
  835. // the media query includes "min-width: @phone"
  836. // because the phone layout includes the tablet layout unconditionally.
  837. .center-aligment-no {
  838. .results-tablet();
  839. }
  840. }
  841. /* Misc */
  842. #main_results div#results.only_template_images {
  843. margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
  844. display: grid;
  845. grid-template-columns: 100%;
  846. grid-template-rows: min-content min-content min-content 1fr min-content;
  847. gap: 0;
  848. grid-template-areas:
  849. "corrections"
  850. "answers"
  851. "sidebar"
  852. "urls"
  853. "pagination";
  854. #sidebar {
  855. display: none;
  856. }
  857. #urls {
  858. margin: 0;
  859. display: flex;
  860. flex-wrap: wrap;
  861. }
  862. #urls::after {
  863. flex-grow: 10;
  864. content: "";
  865. }
  866. #backToTop {
  867. .ltr-left(auto);
  868. .ltr-right(1rem);
  869. }
  870. #pagination {
  871. .ltr-margin-right(4rem);
  872. }
  873. }
  874. /*
  875. phone layout
  876. */
  877. @media screen and (max-width: @phone) {
  878. // based on the tablet layout
  879. .results-tablet();
  880. html {
  881. background-color: var(--color-base-background-mobile);
  882. }
  883. #main_results div#results {
  884. grid-template-columns: 100%;
  885. margin: 0 auto;
  886. }
  887. #links_on_top {
  888. top: 1.4rem;
  889. .ltr-right(10px);
  890. }
  891. #main_index #links_on_top {
  892. top: 0.5rem;
  893. .ltr-right(0.5rem);
  894. }
  895. #results {
  896. margin: 0;
  897. padding: 0;
  898. }
  899. #pagination {
  900. margin: 2rem 1rem 0 1rem !important;
  901. }
  902. article[data-vim-selected] {
  903. border: 1px solid var(--color-result-vim-arrow);
  904. .rounded-corners;
  905. }
  906. .result {
  907. background: var(--color-result-background);
  908. border: 1px solid var(--color-result-background);
  909. margin: 1rem 10px;
  910. .rounded-corners;
  911. }
  912. .result-images {
  913. margin: 0;
  914. height: @results-image-row-height-phone;
  915. background: var(--color-base-background-mobile);
  916. }
  917. .infobox {
  918. border: none !important;
  919. background-color: var(--color-sidebar-background);
  920. }
  921. .numbered_pagination {
  922. display: none;
  923. }
  924. .result-paper,
  925. .result-packages {
  926. .attributes {
  927. display: block;
  928. div {
  929. display: block;
  930. span {
  931. display: inline;
  932. }
  933. span:first-child {
  934. font-weight: bold;
  935. }
  936. span:nth-child(2) {
  937. .ltr-margin-left(0.5rem);
  938. }
  939. }
  940. }
  941. }
  942. }
  943. /*
  944. small-phone layout
  945. */
  946. @media screen and (max-width: @small-phone) {
  947. .result-videos {
  948. img.thumbnail {
  949. float: none !important;
  950. }
  951. .content {
  952. overflow: inherit;
  953. }
  954. }
  955. }
  956. pre code {
  957. white-space: pre-wrap;
  958. }