general.css 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. /* Fonts */
  2. @font-face {
  3. font-family: 'Inter';
  4. font-style: normal;
  5. font-weight: 400;
  6. font-display: swap;
  7. src: url("../fonts/Inter-Regular.woff2?v=3.19") format("woff2"),
  8. url("../fonts/Inter-Regular.woff?v=3.19") format("woff");
  9. }
  10. @font-face {
  11. font-family: 'Inter';
  12. font-style: italic;
  13. font-weight: 400;
  14. font-display: swap;
  15. src: url("../fonts/Inter-Italic.woff2?v=3.19") format("woff2"),
  16. url("../fonts/Inter-Italic.woff?v=3.19") format("woff");
  17. }
  18. @font-face {
  19. font-family: 'Inter';
  20. font-style: normal;
  21. font-weight: 700;
  22. font-display: swap;
  23. src: url("../fonts/Inter-Bold.woff2?v=3.19") format("woff2"),
  24. url("../fonts/Inter-Bold.woff?v=3.19") format("woff");
  25. }
  26. @font-face {
  27. font-family: 'Inter';
  28. font-style: italic;
  29. font-weight: 700;
  30. font-display: swap;
  31. src: url("../fonts/Inter-BoldItalic.woff2?v=3.19") format("woff2"),
  32. url("../fonts/Inter-BoldItalic.woff?v=3.19") format("woff");
  33. }
  34. @font-face {
  35. font-family: 'InterDisplay';
  36. font-style: normal;
  37. font-weight: 900;
  38. font-display: swap;
  39. src: url("../fonts/InterDisplay-Black.woff2?v=3.19") format("woff2"),
  40. url("../fonts/InterDisplay-Black.woff?v=3.19") format("woff");
  41. }
  42. @font-face {
  43. font-family: 'InterDisplay';
  44. font-style: italic;
  45. font-weight: 900;
  46. font-display: swap;
  47. src: url("../fonts/InterDisplay-BlackItalic.woff2?v=3.19") format("woff2"),
  48. url("../fonts/InterDisplay-BlackItalic.woff?v=3.19") format("woff");
  49. }
  50. @font-face {
  51. font-family: 'Chomsky';
  52. font-style: normal;
  53. font-weight: 700;
  54. font-display: swap;
  55. src: url("../fonts/Chomsky.otf") format("otf");
  56. }
  57. @font-face {
  58. font-family: 'IBMPlexMono';
  59. font-style: normal;
  60. font-weight: 400;
  61. font-display: swap;
  62. src: url("../fonts/IBMPlexMono-Regular.otf") format("otf"),
  63. url("../fonts/IBMPlexMono-Regular.woff?v=3.19") format("woff");
  64. }
  65. /* Base styles and content styles */
  66. @import 'variables.css';
  67. :root {
  68. /* Browser default font-size is 16px, this way 1 rem = 10px */
  69. font-size: 62.5%;
  70. }
  71. html {
  72. font-family: "Inter", sans-serif;
  73. color: var(--fg);
  74. background-color: var(--bg);
  75. text-size-adjust: none;
  76. -webkit-text-size-adjust: none;
  77. }
  78. body {
  79. margin: 0;
  80. font-size: 1.6rem;
  81. overflow-x: hidden;
  82. padding-bottom:80px;
  83. }
  84. code {
  85. font-family: "IBMPlexMono", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
  86. font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
  87. }
  88. /* Don't change font size in headers. */
  89. h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
  90. font-size: unset;
  91. }
  92. .left { float: left; }
  93. .right { float: right; }
  94. .boring { opacity: 0.6; }
  95. .hide-boring .boring { display: none; }
  96. .hidden { display: none !important; }
  97. h2, h3 { margin-top: 2.5em; }
  98. h4, h5 { margin-top: 2em; }
  99. .header + .header h3,
  100. .header + .header h4,
  101. .header + .header h5 {
  102. margin-top: 1em;
  103. }
  104. h1:target::before,
  105. h2:target::before,
  106. h3:target::before,
  107. h4:target::before,
  108. h5:target::before,
  109. h6:target::before {
  110. display: inline-block;
  111. content: "»";
  112. margin-left: -30px;
  113. width: 30px;
  114. }
  115. /* This is broken on Safari as of version 14, but is fixed
  116. in Safari Technology Preview 117 which I think will be Safari 14.2.
  117. https://bugs.webkit.org/show_bug.cgi?id=218076
  118. */
  119. :target {
  120. scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
  121. }
  122. .page {
  123. outline: 0;
  124. padding: 0 var(--page-padding);
  125. margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
  126. }
  127. .page-wrapper {
  128. box-sizing: border-box;
  129. }
  130. .js:not(.sidebar-resizing) .page-wrapper {
  131. transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
  132. }
  133. .content {
  134. overflow-y: auto;
  135. padding: 0 15px;
  136. padding-bottom: 50px;
  137. }
  138. .content main {
  139. margin-left: auto;
  140. margin-right: auto;
  141. /* max-width: var(--content-max-width); */
  142. }
  143. .content p { line-height: 1.45em; }
  144. .content ol { line-height: 1.45em; }
  145. .content ul { line-height: 1.45em; }
  146. .content a { text-decoration: none; }
  147. .content a:hover { text-decoration: underline }
  148. .content img, .content video { max-width: 100%; }
  149. .content .header:link,
  150. .content .header:visited {
  151. color: var(--fg);
  152. }
  153. .content .header:link,
  154. .content .header:visited:hover {
  155. text-decoration: none;
  156. }
  157. table {
  158. margin: 0 auto;
  159. border-collapse: collapse;
  160. }
  161. table td {
  162. padding: 3px 20px;
  163. border: 1px var(--table-border-color) solid;
  164. }
  165. table thead {
  166. background: var(--table-header-bg);
  167. }
  168. table thead td {
  169. font-weight: 700;
  170. border: none;
  171. }
  172. table thead th {
  173. padding: 3px 20px;
  174. }
  175. table thead tr {
  176. border: 1px var(--table-header-bg) solid;
  177. }
  178. /* Alternate background colors for rows */
  179. table tbody tr:nth-child(2n) {
  180. background: var(--table-alternate-bg);
  181. }
  182. blockquote {
  183. margin: 20px 0;
  184. padding: 0 20px;
  185. color: var(--fg);
  186. background-color: var(--quote-bg);
  187. border-top: .1em solid var(--quote-border);
  188. border-bottom: .1em solid var(--quote-border);
  189. }
  190. :not(.footnote-definition) + .footnote-definition,
  191. .footnote-definition + :not(.footnote-definition) {
  192. margin-top: 2em;
  193. }
  194. .footnote-definition {
  195. font-size: 0.9em;
  196. margin: 0.5em 0;
  197. }
  198. .footnote-definition p {
  199. display: inline;
  200. }
  201. .tooltiptext {
  202. position: absolute;
  203. visibility: hidden;
  204. color: #fff;
  205. background-color: #333;
  206. transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */
  207. left: -8px; /* Half of the width of the icon */
  208. top: -35px;
  209. font-size: 0.8em;
  210. text-align: center;
  211. border-radius: 6px;
  212. padding: 5px 8px;
  213. margin: 5px;
  214. z-index: 1000;
  215. }
  216. .tooltipped .tooltiptext {
  217. visibility: visible;
  218. }
  219. .chapter li.part-title {
  220. color: var(--sidebar-fg);
  221. margin: 5px 0px;
  222. font-weight: bold;
  223. font-size: 1.5em;
  224. }
  225. .result-no-output {
  226. font-style: italic;
  227. }