style.less 19 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  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. #engines_msg {
  633. .engine-name {
  634. width: 10rem;
  635. }
  636. .response-error {
  637. color: var(--color-error);
  638. }
  639. .bar-chart-value {
  640. width: auto;
  641. }
  642. }
  643. #search_url {
  644. div.selectable_url {
  645. pre {
  646. float: left;
  647. width: 200em;
  648. }
  649. }
  650. button#copy_url {
  651. float: right;
  652. padding: 0.4rem;
  653. margin-left: 0.5rem;
  654. border-radius: 0.3rem;
  655. display: none; // will be shown by JS.
  656. }
  657. }
  658. #links_on_top {
  659. position: absolute;
  660. .ltr-right(1rem);
  661. .ltr-text-align-right();
  662. top: 2.7rem;
  663. padding: 0;
  664. border: 0;
  665. display: flex;
  666. align-items: center;
  667. font-size: 1em;
  668. color: var(--color-search-font);
  669. a {
  670. display: flex;
  671. align-items: center;
  672. margin-left: 1em;
  673. svg {
  674. font-size: 1.2em;
  675. .ltr-margin-right(0.125em);
  676. }
  677. }
  678. a,
  679. a:link *,
  680. a:hover *,
  681. a:visited *,
  682. a:active * {
  683. color: var(--color-search-font);
  684. }
  685. }
  686. #pagination {
  687. grid-area: pagination;
  688. br {
  689. clear: both;
  690. }
  691. }
  692. .numbered_pagination {
  693. display: flex;
  694. flex-direction: row;
  695. justify-content: center;
  696. align-items: center;
  697. overflow: hidden;
  698. }
  699. .page_number {
  700. background: transparent !important;
  701. color: var(--color-result-link-font) !important;
  702. text-decoration: underline;
  703. }
  704. .page_number_current {
  705. background: transparent;
  706. color: var(--color-result-link-visited-font);
  707. border: none;
  708. }
  709. #backToTop {
  710. border: 1px solid var(--color-backtotop-border);
  711. margin: 0;
  712. padding: 0;
  713. font-size: 1em;
  714. background: var(--color-backtotop-background);
  715. position: fixed;
  716. bottom: 8rem;
  717. .ltr-left(@results-width + @results-offset + (0.5 * @results-gap - 1.2em));
  718. transition: opacity 0.5s;
  719. opacity: 0;
  720. pointer-events: none;
  721. .rounded-corners;
  722. a {
  723. display: block;
  724. margin: 0;
  725. padding: 0.7em;
  726. }
  727. a,
  728. a:visited,
  729. a:hover,
  730. a:active {
  731. color: var(--color-backtotop-font);
  732. }
  733. }
  734. #results.scrolling #backToTop {
  735. opacity: 1;
  736. pointer-events: all;
  737. }
  738. /*
  739. tablet layout
  740. */
  741. .results-tablet() {
  742. #links_on_top {
  743. span {
  744. display: none;
  745. }
  746. }
  747. .page_with_header {
  748. margin: 2rem 0.5rem;
  749. width: auto;
  750. }
  751. #infoboxes {
  752. position: inherit;
  753. max-width: inherit;
  754. .infobox {
  755. clear: both;
  756. img {
  757. .ltr-float-left();
  758. max-width: 10em;
  759. margin-top: 0.5em;
  760. .ltr-margin-right(0.5em);
  761. margin-bottom: 0.5em;
  762. .ltr-margin-left(0);
  763. }
  764. }
  765. }
  766. #sidebar {
  767. margin: 0 @results-tablet-offset @results-margin @results-tablet-offset;
  768. padding: 0;
  769. float: none;
  770. border: none;
  771. width: auto;
  772. input {
  773. border: 0;
  774. }
  775. }
  776. .result {
  777. .thumbnail {
  778. max-width: 98%;
  779. }
  780. .url {
  781. span.url {
  782. display: block;
  783. white-space: nowrap;
  784. text-overflow: ellipsis;
  785. overflow: hidden;
  786. width: 100%;
  787. }
  788. }
  789. .engines {
  790. .ltr-float-right();
  791. display: flex;
  792. flex-wrap: wrap;
  793. justify-content: flex-end;
  794. padding: 3px 0 0 0;
  795. }
  796. }
  797. .result-images {
  798. border-bottom: none !important;
  799. }
  800. .image_result {
  801. max-width: 98%;
  802. img {
  803. max-width: 98%;
  804. }
  805. }
  806. #backToTop {
  807. display: none;
  808. }
  809. #pagination {
  810. margin: 2rem 0 0 0 !important;
  811. }
  812. #main_results div#results {
  813. margin: 0 auto;
  814. justify-content: center;
  815. display: grid;
  816. grid-template-columns: @results-width;
  817. grid-template-rows: min-content min-content min-content 1fr min-content min-content;
  818. gap: 0;
  819. grid-template-areas:
  820. "corrections"
  821. "answers"
  822. "sidebar"
  823. "urls"
  824. "pagination";
  825. }
  826. }
  827. @media screen and (max-width: calc(@tablet - 0.5px)) {
  828. #links_on_top {
  829. span {
  830. display: none;
  831. }
  832. }
  833. }
  834. @media screen and (max-width: 52rem) {
  835. body.results_endpoint {
  836. #links_on_top {
  837. .link_on_top_about,
  838. .link_on_top_donate {
  839. display: none;
  840. }
  841. }
  842. }
  843. }
  844. @media screen and (min-width: @phone) and (max-width: @tablet) {
  845. // when .center-aligment-yes, see style-center.less
  846. // the media query includes "min-width: @phone"
  847. // because the phone layout includes the tablet layout unconditionally.
  848. .center-aligment-no {
  849. .results-tablet();
  850. }
  851. }
  852. /* Misc */
  853. #main_results div#results.only_template_images {
  854. margin: 1rem @results-tablet-offset 0 @results-tablet-offset;
  855. display: grid;
  856. grid-template-columns: 100%;
  857. grid-template-rows: min-content min-content min-content 1fr min-content;
  858. gap: 0;
  859. grid-template-areas:
  860. "corrections"
  861. "answers"
  862. "sidebar"
  863. "urls"
  864. "pagination";
  865. #sidebar {
  866. display: none;
  867. }
  868. #urls {
  869. margin: 0;
  870. display: flex;
  871. flex-wrap: wrap;
  872. }
  873. #urls::after {
  874. flex-grow: 10;
  875. content: "";
  876. }
  877. #backToTop {
  878. .ltr-left(auto);
  879. .ltr-right(1rem);
  880. }
  881. #pagination {
  882. .ltr-margin-right(4rem);
  883. }
  884. }
  885. /*
  886. phone layout
  887. */
  888. @media screen and (max-width: @phone) {
  889. // based on the tablet layout
  890. .results-tablet();
  891. html {
  892. background-color: var(--color-base-background-mobile);
  893. }
  894. #main_results div#results {
  895. grid-template-columns: 100%;
  896. margin: 0 auto;
  897. }
  898. #links_on_top {
  899. top: 1.4rem;
  900. .ltr-right(10px);
  901. }
  902. #main_index #links_on_top {
  903. top: 0.5rem;
  904. .ltr-right(0.5rem);
  905. }
  906. #results {
  907. margin: 0;
  908. padding: 0;
  909. }
  910. #pagination {
  911. margin: 2rem 1rem 0 1rem !important;
  912. }
  913. article[data-vim-selected] {
  914. border: 1px solid var(--color-result-vim-arrow);
  915. .rounded-corners;
  916. }
  917. .result {
  918. background: var(--color-result-background);
  919. border: 1px solid var(--color-result-background);
  920. margin: 1rem 10px;
  921. .rounded-corners;
  922. }
  923. .result-images {
  924. margin: 0;
  925. height: @results-image-row-height-phone;
  926. background: var(--color-base-background-mobile);
  927. }
  928. .infobox {
  929. border: none !important;
  930. background-color: var(--color-sidebar-background);
  931. }
  932. .numbered_pagination {
  933. display: none;
  934. }
  935. .result-paper,
  936. .result-packages {
  937. .attributes {
  938. display: block;
  939. div {
  940. display: block;
  941. span {
  942. display: inline;
  943. }
  944. span:first-child {
  945. font-weight: bold;
  946. }
  947. span:nth-child(2) {
  948. .ltr-margin-left(0.5rem);
  949. }
  950. }
  951. }
  952. }
  953. }
  954. /*
  955. small-phone layout
  956. */
  957. @media screen and (max-width: @small-phone) {
  958. .result-videos {
  959. img.thumbnail {
  960. float: none !important;
  961. }
  962. .content {
  963. overflow: inherit;
  964. }
  965. }
  966. }
  967. pre code {
  968. white-space: pre-wrap;
  969. }