common.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. :root {
  2. --ls-tag-text-opacity: 0.6;
  3. --ls-tag-text-hover-opacity: 0.8;
  4. --ls-page-text-size: 1em;
  5. --ls-page-title-size: 36px;
  6. --ls-font-family: 'Inter';
  7. --ls-main-content-max-width: 700px;
  8. --ls-border-radius-low: 4px;
  9. --ls-border-radius-medium: 8px;
  10. }
  11. @media (prefers-color-scheme: dark) {
  12. html {
  13. background-color: #002b36;
  14. }
  15. html[data-theme=light] {
  16. background-color: transparent;
  17. }
  18. }
  19. @supports (font-variation-settings: normal) {
  20. html {
  21. font-family: 'Inter var', sans-serif;
  22. }
  23. }
  24. .dark-theme,
  25. html[data-theme=dark] {
  26. --ls-primary-background-color: #002b36;
  27. --ls-secondary-background-color: #023643;
  28. --ls-tertiary-background-color: #08404f;
  29. --ls-quaternary-background-color: #094b5a;
  30. --ls-table-tr-even-background-color: #03333f;
  31. --ls-active-primary-color: #8ec2c2;
  32. --ls-active-secondary-color: #d0e8e8;
  33. --ls-block-properties-background-color: #02222a;
  34. --ls-block-ref-link-text-color: #1a6376;
  35. --ls-search-background-color: var(--ls-primary-background-color);
  36. --ls-border-color: #0e5263;
  37. --ls-guideline-color: #0b4a5a;
  38. --ls-menu-hover-color: var(--ls-secondary-background-color);
  39. --ls-primary-text-color: #a4b5b6;
  40. --ls-secondary-text-color: #dfdfdf;
  41. --ls-title-text-color: #93a1a1;
  42. --ls-link-text-color: rgb(138, 187, 187);
  43. --ls-link-text-hover-color: var(--ls-active-secondary-color);
  44. --ls-link-ref-text-color: var(--ls-link-text-color);
  45. --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color);
  46. --ls-tag-text-color: var(--ls-link-text-color);
  47. --ls-tag-text-hover-color: var(--ls-link-text-hover-color);
  48. --ls-slide-background-color: var(--ls-primary-background-color);
  49. --ls-block-bullet-border-color: #0f4958;
  50. --ls-block-bullet-color: #608e91;
  51. --ls-block-highlight-color: #0a3d4b;
  52. --ls-selection-background-color: #338fff;
  53. --ls-page-checkbox-color: #6093a0;
  54. --ls-page-checkbox-border-color: var(--ls-primary-background-color);
  55. --ls-page-blockquote-color: var(--ls-primary-text-color);
  56. --ls-page-blockquote-bg-color: var(--ls-secondary-background-color);
  57. --ls-page-blockquote-border-color: var(--ls-border-color);
  58. --ls-page-inline-code-color: var(--ls-primary-text-color);
  59. --ls-page-inline-code-bg-color: #01222a;
  60. --ls-scrollbar-foreground-color: rgba(255, 255, 255, 0.1);
  61. --ls-scrollbar-background-color: rgba(255, 255, 255, 0.05);
  62. --ls-scrollbar-thumb-hover-color: rgba(255, 255, 255, 0.2);
  63. --ls-head-text-color: var(--ls-link-text-color);
  64. --ls-icon-color: var(--ls-link-text-color);
  65. --ls-search-icon-color: var(--ls-link-text-color);
  66. --ls-a-chosen-bg: var(--ls-secondary-background-color);
  67. --ls-right-sidebar-code-bg-color: #04303c;
  68. --color-level-1: var(--ls-secondary-background-color);
  69. --color-level-2: var(--ls-tertiary-background-color);
  70. --color-level-3: var(--ls-quaternary-background-color);
  71. --color-level-4: #195d6c;
  72. --color-level-5: #266c7d;
  73. --color-level-6: #3a7e8e;
  74. }
  75. .white-theme,
  76. html[data-theme=light] {
  77. --ls-primary-background-color: white;
  78. --ls-secondary-background-color: #dee9f2;
  79. --ls-tertiary-background-color: #f0f8ff;
  80. --ls-quaternary-background-color: #e1f0fe;
  81. --ls-table-tr-even-background-color: #f4f5f7;
  82. --ls-active-primary-color: rgb(4, 85, 145);
  83. --ls-active-secondary-color: #003761;
  84. --ls-block-properties-background-color: var(--ls-tertiary-background-color);
  85. --ls-block-ref-link-text-color: #D8E1E8;
  86. --ls-search-background-color: var(--ls-primary-background-color);
  87. --ls-border-color: #ccc;
  88. --ls-guideline-color: var(--ls-border-color);
  89. --ls-menu-hover-color: var(--ls-a-chosen-bg);
  90. --ls-primary-text-color: #24292e;
  91. --ls-secondary-text-color: #161e2e;
  92. --ls-title-text-color: #222;
  93. --ls-link-text-color: var(--ls-active-primary-color);
  94. --ls-link-text-hover-color: var(--ls-active-secondary-color);
  95. --ls-link-ref-text-color: var(--ls-link-text-color);
  96. --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color);
  97. --ls-tag-text-color: var(--ls-link-text-color);
  98. --ls-tag-text-hover-color: var(--ls-link-text-hover-color);
  99. --ls-slide-background-color: #fff;
  100. --ls-block-bullet-border-color: var(--ls-border-color);
  101. --ls-block-bullet-color: #394b59;
  102. --ls-block-highlight-color: #c0e6fd;
  103. --ls-selection-background-color: #e4f2ff;
  104. --ls-page-checkbox-color: var(--ls-active-primary-color);
  105. --ls-page-checkbox-border-color: #8c8c8c;
  106. --ls-page-blockquote-color: var(--ls-primary-text-color);
  107. --ls-page-blockquote-bg-color: var(--ls-secondary-background-color);
  108. --ls-page-blockquote-border-color: var(--ls-active-primary-color);
  109. --ls-page-inline-code-bg-color: var(--ls-secondary-background-color);
  110. --ls-page-inline-code-color: var(--ls-primary-text-color);
  111. --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.1);
  112. --ls-scrollbar-background-color: rgba(0, 0, 0, 0.05);
  113. --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.2);
  114. --ls-head-text-color: var(--ls-link-text-color);
  115. --ls-icon-color: #6b7280;
  116. --ls-search-icon-color: var(--ls-icon-color);
  117. --ls-a-chosen-bg: #f4f5f7;
  118. --ls-right-sidebar-code-bg-color: var(--ls-secondary-background-color);
  119. --color-level-1: var(--ls-secondary-background-color);
  120. --color-level-2: var(--ls-tertiary-background-color);
  121. --color-level-3: var(--ls-quaternary-background-color);
  122. --color-level-4: #d0e6fa;
  123. --color-level-5: #bbdaf6;
  124. }
  125. /* region Reset top elements */
  126. html {
  127. font-family: var(--ls-font-family), Inter, sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol !important;
  128. /* FIXME: rewrite revealjs.css ? */
  129. height: unset !important;
  130. overflow: auto !important;
  131. }
  132. body {
  133. color: #24292e;
  134. line-height: 1.5;
  135. background-color: transparent;
  136. min-height: 100%;
  137. word-break: break-word; /* compatible for overflow-wrap: anywhere */
  138. }
  139. a svg {
  140. color: var(--ls-icon-color);
  141. }
  142. svg {
  143. pointer-events: none;
  144. }
  145. textarea {
  146. overflow: hidden;
  147. padding: 8px;
  148. border: 1px solid rgba(39, 41, 43, 0.15);
  149. border-radius: var(--ls-border-radius-low);
  150. font-size: 1em;
  151. line-height: 1.5;
  152. width: 100%;
  153. resize: none;
  154. outline: none;
  155. font-weight: inherit;
  156. letter-spacing: inherit;
  157. text-size-adjust: 100%;
  158. }
  159. ul {
  160. list-style: circle;
  161. margin-left: 1.2em;
  162. }
  163. ol {
  164. list-style: decimal;
  165. margin-left: 1.2em;
  166. }
  167. p {
  168. line-height: 1.5;
  169. margin: 0.5rem 0;
  170. color: var(--ls-primary-text-color)
  171. }
  172. li {
  173. margin: 0.25rem 0;
  174. }
  175. li:first-child {
  176. margin-top: 0;
  177. }
  178. pre {
  179. background: var(--ls-secondary-background-color, #f6f8fa);
  180. margin: 1rem 0;
  181. line-height: 1.45em;
  182. overflow: auto;
  183. }
  184. a {
  185. cursor: pointer;
  186. color: var(--ls-link-text-color, #045591);
  187. text-decoration: none;
  188. }
  189. a:hover {
  190. color: var(--ls-link-text-hover-color, #000);
  191. }
  192. code {
  193. font-size: 85%;
  194. }
  195. pre.code {
  196. background: #282a36;
  197. background: var(--ls-secondary-background-color);
  198. color: var(--ls-primary-text-color, #f8f8f2);
  199. }
  200. :not(pre) > code {
  201. }
  202. mark {
  203. background: #fef3ac;
  204. color: #262626;
  205. padding: 0 1px;
  206. }
  207. dl {
  208. margin: 1rem 0;
  209. }
  210. dt {
  211. margin-bottom: 0.25rem;
  212. font-weight: bold;
  213. }
  214. blockquote {
  215. display: block;
  216. text-indent: 0;
  217. padding: 8px 20px;
  218. border-left: 4px solid;
  219. border-left-color: var(--ls-page-blockquote-border-color, #d3d3d3);
  220. background-color: var(--ls-page-blockquote-bg-color, #f7f7f7);
  221. margin: 1rem 0;
  222. color: var(--ls-page-blockquote-color, #24292e);
  223. font-size: 1rem;
  224. }
  225. input {
  226. color: var(--ls-primary-text-color);
  227. background: transparent;
  228. }
  229. summary {
  230. outline: none;
  231. }
  232. iframe {
  233. /* width: 100%; */
  234. margin: 1rem 0;
  235. }
  236. img,
  237. video {
  238. margin-left: auto;
  239. margin-right: auto;
  240. }
  241. ::selection {
  242. background: var(--ls-selection-background-color);
  243. color: var(--ls-primary-text-color);
  244. }
  245. ::-moz-selection {
  246. background: var(--ls-selection-background-color);
  247. color: var(--ls-primary-text-color);
  248. }
  249. :not(pre) > code {
  250. font-style: normal !important;
  251. letter-spacing: 0;
  252. padding: 0.1em 0.4em;
  253. word-spacing: -0.15em;
  254. -webkit-border-radius: var(--ls-border-radius-low);
  255. border-radius: var(--ls-border-radius-low);
  256. color: var(--ls-page-inline-code-color);
  257. background-color: var(--ls-page-inline-code-bg-color, #eee);
  258. line-height: 1.45;
  259. text-rendering: optimizeSpeed
  260. }
  261. /* endregion */
  262. /** region Common utilities **/
  263. .w10 {
  264. max-width: 10%;
  265. }
  266. .w20 {
  267. max-width: 20%;
  268. }
  269. .w30 {
  270. max-width: 30%;
  271. }
  272. .w40 {
  273. max-width: 40%;
  274. }
  275. .w50 {
  276. max-width: 50%;
  277. }
  278. .w60 {
  279. max-width: 60%;
  280. }
  281. .w70 {
  282. max-width: 70%;
  283. }
  284. .w80 {
  285. max-width: 80%;
  286. }
  287. .w90 {
  288. max-width: 90%;
  289. }
  290. .w100 {
  291. max-width: 100%;
  292. }
  293. /* TODO: add all tailwind supported bg colors */
  294. .bg-pink-100 {
  295. background-color: #fff5f7;
  296. }
  297. .bg-pink-200 {
  298. background-color: #fed7e2;
  299. }
  300. .bg-pink-300 {
  301. background-color: #fbb6ce;
  302. }
  303. .bg-pink-400 {
  304. background-color: #f687b3;
  305. }
  306. .bg-pink-500 {
  307. background-color: #ed64a6;
  308. }
  309. .bg-pink-600 {
  310. background-color: #d53f8c;
  311. }
  312. .bg-pink-700 {
  313. background-color: #b83280;
  314. }
  315. .bg-pink-800 {
  316. background-color: #97266d;
  317. }
  318. .bg-pink-900 {
  319. background-color: #702459;
  320. }
  321. /** endregion **/
  322. /** region App utilities **/
  323. .page {
  324. margin-top: 24px;
  325. }
  326. .ls-center {
  327. position: absolute;
  328. top: 50%;
  329. left: 50%;
  330. transform: translate(-50%, -50%);
  331. }
  332. li p:first-child,
  333. .block-body p:first-child {
  334. margin-top: 0;
  335. }
  336. li p:last-child,
  337. .block-body p:last-child {
  338. margin-bottom: 0;
  339. }
  340. .bg-base-2 {
  341. background-color: var(--ls-secondary-background-color, #f0f8ff);
  342. }
  343. .bg-base-3 {
  344. background-color: var(--ls-primary-background-color, #fff);
  345. }
  346. .pre-white-space {
  347. white-space: pre;
  348. }
  349. .pre-wrap-white-space {
  350. white-space: pre-wrap;
  351. }
  352. .pre-line-white-space {
  353. white-space: pre-line;
  354. }
  355. .cursor-pointer,
  356. .cursor {
  357. cursor: pointer;
  358. }
  359. .external-link {
  360. text-decoration: none;
  361. border-bottom: 1px solid;
  362. }
  363. .noscroll {
  364. position: fixed;
  365. overflow-y: scroll
  366. }
  367. .loader {
  368. -webkit-animation: spin 2s infinite linear;
  369. }
  370. .canceled,
  371. .done {
  372. text-decoration: line-through;
  373. opacity: 0.6;
  374. }
  375. .opacity-70 {
  376. opacity: 0.7;
  377. }
  378. .opacity-80 {
  379. opacity: 0.8;
  380. }
  381. .done > input {
  382. opacity: 1;
  383. }
  384. .page-drop-options {
  385. width: 18em;
  386. }
  387. .fixed-width {
  388. max-width: calc(var(--ls-main-content-max-width) - 30px);
  389. }
  390. .center,
  391. .foldable-title {
  392. margin: 0 auto;
  393. }
  394. .translate-x-5 {
  395. --transform-translate-x: 1.25rem;
  396. }
  397. .done,
  398. .canceled {
  399. opacity: 0.7;
  400. }
  401. .svg-shadow {
  402. -webkit-filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.7));
  403. filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
  404. }
  405. .tip-shadow {
  406. -webkit-filter: drop-shadow(1px 1px 2px rgba(155, 155, 0, 0.8));
  407. filter: drop-shadow(1px 1px 2px rgba(155, 155, 0, 0.8));
  408. }
  409. .admonition-icon {
  410. border-right: 1px solid;
  411. border-right-color: var(--ls-border-color, #ccc);
  412. }
  413. .dnd-separator {
  414. border-bottom: 3px solid transparent;
  415. }
  416. .dnd-separator-cur {
  417. border-bottom: 3px solid #999;
  418. }
  419. .aspect-ratio-square {
  420. padding-top: 100%;
  421. }
  422. .aspect-ratio-16\/9 {
  423. padding-top: 56.25%;
  424. }
  425. .aspect-ratio-4\/3 {
  426. padding-top: 75%;
  427. }
  428. .aspect-ratio-21\/9 {
  429. padding-top: 42.86%;
  430. }
  431. .footdef {
  432. margin: 1rem 0;
  433. }
  434. .admonitionblock {
  435. margin: 2rem 0;
  436. }
  437. .abstract {
  438. margin: 2rem 0;
  439. width: 80%;
  440. font-style: italic;
  441. }
  442. .abstract p:last-of-type::before {
  443. content: " ";
  444. white-space: pre;
  445. }
  446. .dropdown-overflow-auto {
  447. max-height: 400px;
  448. overflow-y: auto;
  449. }
  450. .marker-switch {
  451. font-size: 85%;
  452. margin-right: 6px;
  453. margin-left: 2px;
  454. border-radius: 3px;
  455. font-weight: 500;
  456. display: inline-block;
  457. text-align: center;
  458. width: 16px;
  459. height: 18px;
  460. opacity: 0.5;
  461. padding: 0 2px 0 2px;
  462. border: 1px solid;
  463. line-height: 1.3;
  464. }
  465. .heading-bg {
  466. border-radius: 50%;
  467. width: 12px;
  468. height: 12px;
  469. }
  470. /** endregion **/
  471. /* region FIXME: override elements (?) */
  472. a.block-control,
  473. a.block-control:hover {
  474. text-decoration: none;
  475. cursor: pointer;
  476. font-size: 14px;
  477. min-width: 10px;
  478. color: initial;
  479. }
  480. h1.title {
  481. margin-bottom: 1.5rem;
  482. color: var(--ls-title-text-color, #222);
  483. font-size: var(--ls-page-title-size, 36px);
  484. }
  485. .block-highlight,
  486. .content .selected {
  487. transition: background-color 0.15s;
  488. background-color: var(--ls-block-highlight-color);
  489. padding: -1px;
  490. }
  491. .content img {
  492. margin-top: 0.5rem;
  493. margin-bottom: 0.5rem;
  494. }
  495. span.timestamp {
  496. margin: 0 0.25rem;
  497. }
  498. span.priority {
  499. color: #6b7280;
  500. }
  501. .form-checkbox:not(:checked):focus {
  502. box-shadow: none;
  503. }
  504. .form-checkbox:checked:focus {
  505. box-shadow: none;
  506. }
  507. a.nav-item:hover,
  508. a.star-page:hover {
  509. background-color: #00242d;
  510. }
  511. button.menu {
  512. border-right: 1px solid;
  513. border-right-color: var(--ls-secondary-background-color, #f0f8ff);
  514. color: var(--ls-link-text-color, #24292e);
  515. }
  516. a.menu-link:hover,
  517. button.pull:hover,
  518. button.menu:focus {
  519. background-color: var(--ls-menu-hover-color, #f4f5f7);
  520. }
  521. a.menu-link {
  522. background-color: var(--ls-primary-background-color, #fff);
  523. color: var(--ls-primary-text-color);
  524. }
  525. a.menu-link:first-of-type {
  526. border-top-left-radius: var(--ls-border-radius-low);
  527. border-top-right-radius: var(--ls-border-radius-low);
  528. }
  529. a.menu-link:last-of-type {
  530. border-bottom-left-radius: var(--ls-border-radius-low);
  531. border-bottom-right-radius: var(--ls-border-radius-low);
  532. }
  533. a.login {
  534. color: var(--ls-link-text-color, #444);
  535. }
  536. a.login:hover {
  537. color: var(--ls-link-text-hover-color, #000);
  538. }
  539. a.marker-switch:hover {
  540. opacity: 1;
  541. }
  542. a.tooltip-priority {
  543. display: contents;
  544. position: absolute;
  545. left: 0;
  546. }
  547. a.tooltip-priority::after {
  548. content: attr(priority);
  549. margin-right: 10px;
  550. }
  551. a.chosen {
  552. background: var(--ls-a-chosen-bg);
  553. }
  554. a.warning,
  555. span.warning {
  556. background: #f56565;
  557. padding: 0.1em 0.4em;
  558. border-radius: var(--ls-border-radius-low);
  559. color: #fff;
  560. }
  561. img.small {
  562. display: inline;
  563. width: 20px;
  564. height: 20px;
  565. margin-top: 0;
  566. margin-bottom: 0;
  567. }
  568. a.tag {
  569. opacity: var(--ls-tag-text-opacity, 0.6);
  570. color: var(--ls-tag-text-color, #045591);
  571. }
  572. a.tag:hover {
  573. opacity: var(--ls-tag-text-hover-opacity, 0.8);
  574. color: var(--ls-tag-text-hover-color, #045591);
  575. }
  576. svg.note {
  577. color: var(--ls-primary-text-color, #19407c);
  578. }
  579. svg.tip {
  580. color: var(--ls-active-primary-color);
  581. }
  582. /* endregion */
  583. /* region FIXME: CodeMirror override (?) */
  584. .CodeMirror pre.CodeMirror-line,
  585. .CodeMirror-scroll,
  586. .CodeMirror-sizer,
  587. .CodeMirror-gutter,
  588. .CodeMirror-gutters,
  589. .CodeMirror-linenumber {
  590. font-size: 14px;
  591. }
  592. /* endregion */
  593. hr {
  594. margin: 2rem 0;
  595. border-color: var(--ls-border-color, #ccc);
  596. }