lesson.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. :root {
  2. --page-padding: 24px;
  3. /* these are overridden in manual/<lang>/lang.css */
  4. --article-font-family: Georgia, serif;
  5. --headline-font-family: sans-serif;
  6. /* a block of code */
  7. --code-block-font-family: "Lucida Console", Monaco, monospace;
  8. /* a word in a sentence */
  9. --code-font-family: monospace;
  10. }
  11. body {
  12. margin: 0;
  13. font-family: var(--article-font-family);
  14. font-size: 19px;
  15. line-height: 150%;
  16. padding: var(--page-padding);
  17. }
  18. p + p {
  19. margin-top: 1.5em;
  20. }
  21. li > p {
  22. width: calc(100% - 2em);
  23. }
  24. table {
  25. margin-top: 1em;
  26. margin-bottom: 1em;
  27. }
  28. .warning {
  29. padding: 1em;
  30. background: red;
  31. }
  32. .footnote {
  33. font-size: smaller;
  34. vertical-align: baseline;
  35. position: relative;
  36. top: -0.4em;
  37. }
  38. .footnotes {
  39. font-size: smaller;
  40. }
  41. .deep-link {
  42. position: absolute;
  43. transform: translateX(-1em);
  44. }
  45. pre {
  46. background: rgb(143, 140, 140);
  47. padding: 1em;
  48. }
  49. pre>code {
  50. white-space: inherit;
  51. background: none;
  52. }
  53. pre.prettyprint {
  54. margin-top: 2em !important;
  55. margin-bottom: 2em !important;
  56. position: relative;
  57. }
  58. pre.prettyprint li {
  59. white-space: pre;
  60. }
  61. pre.prettyprint code, .dos {
  62. color: #CCC;
  63. font-family: var(--code-block-font-family);
  64. display: block;
  65. }
  66. /* to handle long words in paragraph */
  67. p code {
  68. word-break: break-word;
  69. white-space: normal;
  70. }
  71. div[data-diagram] {
  72. height: 100%;
  73. }
  74. .spread {
  75. display: flex;
  76. text-align: center;
  77. margin: 2em auto 3em;
  78. }
  79. .spread div[data-diagram] {
  80. height: 150px;
  81. }
  82. .spread>div {
  83. flex: 1 1 100%;
  84. }
  85. .spread .code {
  86. font-family: var(--code-font-family);
  87. }
  88. .spread .code>div {
  89. text-align: left;
  90. }
  91. #c {
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. width: 100%;
  96. height: 100%;
  97. z-index: -100;
  98. }
  99. .border {
  100. border: 1px solid black;
  101. }
  102. .lesson-comment-notes {
  103. padding: 1em;
  104. margin: 1em;
  105. background: #DDD;
  106. color: red;
  107. }
  108. .threejs_navbar>div,
  109. .lesson-title,
  110. .lesson-comments,
  111. .lesson-comment-sep,
  112. .lesson-main>* {
  113. margin: 0 auto 1em;
  114. max-width: 700px;
  115. width: calc(100% - 40px);
  116. }
  117. .lesson-main>h1:not(:first-child),
  118. .lesson-main>h2:not(:first-child),
  119. .lesson-main>h3:not(:first-child),
  120. .lesson-main>h4:not(:first-child),
  121. .lesson-main>h5:not(:first-child),
  122. .lesson-main>h6:not(:first-child) {
  123. margin-top: 1.66em;
  124. }
  125. .lesson-main>.threejs_example_container {
  126. max-width: 90%;
  127. }
  128. .lesson-main>img {
  129. width: unset;
  130. }
  131. .threejs_example {
  132. width: 100%;
  133. height: 500px;
  134. }
  135. .color {
  136. padding: 0.25em;
  137. border-radius: 0.5em;
  138. color: black;
  139. }
  140. .dark-color {
  141. padding: 0.25em;
  142. border-radius: 0.5em;
  143. color: white;
  144. }
  145. .checkerboard {
  146. background-color: #404040;
  147. background-image:
  148. linear-gradient(45deg, #808080 25%, transparent 25%),
  149. linear-gradient(-45deg, #808080 25%, transparent 25%),
  150. linear-gradient(45deg, transparent 75%, #808080 75%),
  151. linear-gradient(-45deg, transparent 75%, #808080 75%);
  152. background-size: 20px 20px;
  153. background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  154. }
  155. .fullscreen {
  156. position: fixed !important;
  157. left: 0;
  158. top: 0;
  159. width: 100% !important;
  160. height: 100% !important;
  161. z-index: 100;
  162. }
  163. .lesson-main>blockquote {
  164. background-color: #DEF;
  165. padding: 1em;
  166. }
  167. .lesson-title {
  168. margin-top: 3em;
  169. margin-bottom: 2em;
  170. }
  171. .lesson-sidebar {
  172. font-size: small;
  173. columns: 220px;
  174. padding: 1em;
  175. column-rule: dashed 1px #CCC;
  176. background: #eee;
  177. margin-bottom: 1em;
  178. }
  179. .lesson-sidebar>ul>li {
  180. line-height: 1.3em;
  181. }
  182. .lesson-sidebar ul {
  183. line-height: 1.3em;
  184. margin-bottom: 1em;
  185. }
  186. .lesson-sidebar ul {
  187. list-style-type: none;
  188. padding-left: 1em;
  189. text-indent: -1em;
  190. }
  191. h1, h2, h3, h4 {
  192. font-family: var(--headline-font-family);
  193. line-height: 1.2;
  194. }
  195. h3 {
  196. font-size: medium;
  197. }
  198. code {
  199. color: black;
  200. font-family: var(--code-font-family);
  201. background-color: #ddd;
  202. padding: 0.1em 0.2em 0.1em 0.2em;
  203. border-radius: 0.5em;
  204. white-space: nowrap;
  205. }
  206. .threejs_table_div_center {
  207. text-align: center;
  208. }
  209. .threejs_table_center {
  210. margin-left: auto;
  211. margin-right: auto;
  212. }
  213. .threejs_center {
  214. margin-left: auto;
  215. margin-top: 1em;
  216. margin-bottom: 1em;
  217. margin-right: auto;
  218. display: block;
  219. text-align: center;
  220. max-width: 95%;
  221. }
  222. .threejs_center>img,
  223. .threejs_center>object {
  224. max-width: 100%;
  225. }
  226. .threejs_image>img {
  227. width: 100%;
  228. display: block;
  229. }
  230. .threejs_math {
  231. margin-left: auto;
  232. margin-right: auto;
  233. display: inline-block;
  234. text-align: left;
  235. }
  236. .threejs_math_center {
  237. display: block;
  238. text-align: center;
  239. }
  240. .hcenter {
  241. display: -webkit-box;
  242. -webkit-box-orient: horizontal;
  243. -webkit-box-pack: center;
  244. -webkit-box-align: center;
  245. display: -moz-box;
  246. -moz-box-orient: horizontal;
  247. -moz-box-pack: center;
  248. -moz-box-align: center;
  249. display: box;
  250. box-orient: horizontal;
  251. box-pack: center;
  252. box-align: center;
  253. }
  254. table.vertex_table {
  255. border: 1px solid black;
  256. border-collapse: collapse;
  257. font-family: monospace;
  258. font-size: small;
  259. }
  260. table.vertex_table th {
  261. background-color: #88ccff;
  262. padding-right: 1em;
  263. padding-left: 1em;
  264. }
  265. table.vertex_table td {
  266. border: 1px solid black;
  267. text-align: right;
  268. padding-right: 1em;
  269. padding-left: 1em;
  270. }
  271. iframe {
  272. display: block;
  273. }
  274. iframe.body {
  275. height: 100%;
  276. }
  277. iframe.threejs_example, iframe.threejs_diagram {
  278. border: none;
  279. margin-left: auto;
  280. margin-right: auto;
  281. display: block;
  282. }
  283. iframe.threejs_example {
  284. background: black;
  285. }
  286. iframe.noborder {
  287. border: none !important;
  288. }
  289. .threejs_example_container>div {
  290. border: 1px solid black;
  291. margin: 0 auto;
  292. }
  293. iframe.external_diagram {
  294. border: none;
  295. margin-left: auto;
  296. margin-right: auto;
  297. display: block;
  298. }
  299. div.threejs_bottombar {
  300. border: 1px solid #000;
  301. background-color: #def;
  302. padding: 1em;
  303. width: calc(100% - 80px);
  304. }
  305. div.threejs_bottombar>h3 {
  306. font-size: x-large;
  307. font-weight: bold;
  308. margin-bottom: 1em;
  309. }
  310. div.threejs_bottombar code {
  311. background-color: #ccc;
  312. }
  313. /* --- Prettify --- */
  314. pre.prettyprint .nocode { background-color: none; color: #FFF }
  315. pre.prettyprint .str { color: #b9ca4a } /* string */
  316. pre.prettyprint .kwd { color: #c397d8 } /* keyword */
  317. pre.prettyprint .com { color: #f3efb2 } /* comment */
  318. pre.prettyprint .typ { color: #7aa6da } /* type */
  319. pre.prettyprint .lit { color: #45e7a6 } /* literal */
  320. pre.prettyprint .pun { color: #7ecce0 } /* punctuation */
  321. pre.prettyprint .pln { color: #eaeaea } /* plaintext */
  322. pre.prettyprint .tag { color: #d54e53 } /* html/xml tag */
  323. pre.prettyprint .atn { color: #e78c45 } /* attribute name */
  324. pre.prettyprint .atv { color: #70c0b1 } /* attribute value */
  325. pre.prettyprint .dec { color: #e78c45 } /* decimal */
  326. pre.prettyprint .var { color: #d54e53 } /* variable name */
  327. pre.prettyprint .fun { color: #7aa6da } /* function name */
  328. foo{ color: #FF8080}
  329. pre.prettyprint ul.modifiedlines {
  330. list-style-type: none;
  331. padding-left: 0;
  332. }
  333. pre.prettyprint ul.modifiedlines li.linemodified {
  334. list-style-type: none;
  335. background-color: #324840;
  336. }
  337. pre.prettyprint ul.modifiedlines li.linedeleted {
  338. list-style-type: none;
  339. background-color: #4c1414;
  340. text-decoration: line-through;
  341. }
  342. pre.prettyprint ul.modifiedlines li.lineadded {
  343. list-style-type: none;
  344. background-color: #3f4463;
  345. }
  346. pre.prettyprint, code.prettyprint, .dos {
  347. color: #FFF;
  348. background: #222;
  349. border: 1px solid #000;
  350. box-shadow: 10px 10px 0px #ccc;
  351. font-size: 9pt;
  352. font-family: var(--code-block-font-family);
  353. margin: auto;
  354. padding: 1em;
  355. text-align: left; /* override justify on body */
  356. /* this was disabled until 2016-08-26 but I don't know why */
  357. overflow: auto; /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
  358. white-space: pre; /* was nowrap, prevent line wrapping */
  359. line-height: 1.5em;
  360. width: calc(100% - 80px);
  361. }
  362. .dos {
  363. line-height: 1;
  364. }
  365. pre.prettyprint.lighttheme, code.prettyprint.lighttheme {
  366. color: #222;
  367. background: #fff;
  368. border: 1px solid #888;
  369. box-shadow: none;
  370. }
  371. pre.prettyprint.lighttheme .str { color: #183691; } /* string content */
  372. pre.prettyprint.lighttheme .kwd { color: #a71d5d; } /* keyword */
  373. pre.prettyprint.lighttheme .com { color: #969896; } /* comment */
  374. pre.prettyprint.lighttheme .typ { color: #0086b3; } /* type name */
  375. pre.prettyprint.lighttheme .lit { color: #0086b3; } /* literal value */
  376. pre.prettyprint.lighttheme .pun { color: #333; } /* punctuation */
  377. pre.prettyprint.lighttheme .opn { color: #333; } /* lisp open bracket */
  378. pre.prettyprint.lighttheme .clo { color: #333; } /* lisp close bracket */
  379. pre.prettyprint.lighttheme .tag { color: #000080; } /* markup tag name */
  380. pre.prettyprint.lighttheme .atn { color: #795da3; } /* markup attribute name */
  381. pre.prettyprint.lighttheme .atv { color: #183691; } /* markup attribute value */
  382. pre.prettyprint.lighttheme .dec { color: #333; } /* declaration */
  383. pre.prettyprint.lighttheme .var { color: #008080; } /* variable name */
  384. pre.prettyprint.lighttheme .fun { color: #900; } /* function name */
  385. @media print {
  386. pre.prettyprint .str, code.prettyprint .str{color:#060}
  387. pre.prettyprint .kwd, code.prettyprint .kwd{color:#006;font-weight:bold}
  388. pre.prettyprint .com, code.prettyprint .com{color:#600;font-style:italic}
  389. pre.prettyprint .typ, code.prettyprint .typ{color:#404;font-weight:bold}
  390. pre.prettyprint .lit, code.prettyprint .lit{color:#044}
  391. pre.prettyprint .pun, code.prettyprint .pun{color:#440}
  392. pre.prettyprint .pln, code.prettyprint .pln{color:#000}
  393. pre.prettyprint .tag, code.prettyprint .tag{color:#006;font-weight:bold}
  394. pre.prettyprint .atn, code.prettyprint .atn{color:#404}
  395. pre.prettyprint .atv, code.prettyprint .atv{color:#060}
  396. pre.prettyprint, code.prettyprint {
  397. color: #000;
  398. background: #EEE;
  399. font-size: 8pt;
  400. font-family: var(--code-block-font-family);
  401. width: 95%;
  402. margin: auto;
  403. padding: 1em;
  404. text-align: left; /* override justify on body */
  405. overflow: visible;
  406. white-space: pre; /* was nowrap, prevent line wrapping */
  407. line-height: 1.5;
  408. }
  409. pre.prettyprint ul.modifiedlines li.linemodified {
  410. list-style-type: none;
  411. background-color: #DDD;
  412. }
  413. pre.prettyprint ul.modifiedlines li.linedeleted {
  414. list-style-type: none;
  415. background-color: #CCC;
  416. text-decoration: line-through;
  417. }
  418. pre.prettyprint ul.modifiedlines li.lineadded {
  419. list-style-type: none;
  420. background-color: #EEE;
  421. }
  422. body {
  423. margin: 10mm;
  424. }
  425. .doubleSpace p {
  426. line-height: 2.5;
  427. font-size: x-large;
  428. }
  429. .doubleSpace pre.prettyprint {
  430. font-size: 14pt;
  431. }
  432. .threejs_navbar,
  433. .lesson-comment-sep,
  434. .lesson-sidebar,
  435. .lesson-comments {
  436. display: none;
  437. }
  438. }
  439. @media (max-width: 720px) {
  440. body {
  441. font-size: 16px;
  442. }
  443. h1 {
  444. font-size: 24px;
  445. }
  446. .threejs_example {
  447. max-height: 400px;
  448. }
  449. .threejs_example_container>div {
  450. max-width: 95%;
  451. }
  452. .threejs_diagram_container iframe {
  453. max-width: 95%;
  454. }
  455. iframe.background {
  456. max-width: 100%;
  457. }
  458. }
  459. @media all and ( min-width: 1700px ) {
  460. :root {
  461. --page-padding: 28px;
  462. }
  463. }
  464. @media all and ( max-width: 640px ) {
  465. :root {
  466. --page-padding: 16px;
  467. }
  468. }
  469. @media (prefers-color-scheme: dark) {
  470. html {
  471. scrollbar-color: hsl(0, 0%, 35%) hsl(0, 0%, 13%);
  472. }
  473. body {
  474. background: #333;
  475. color: #CCC;
  476. }
  477. a {
  478. color: #56d3fd;
  479. }
  480. .warning {
  481. background: darkred;
  482. }
  483. pre.prettyprint, code.prettyprint, .dos {
  484. box-shadow: 10px 10px 0px #292929;
  485. }
  486. code {
  487. background: #666;
  488. color: #CCC;
  489. }
  490. img {
  491. background: #DDD;
  492. }
  493. img[src$=".svg"] {
  494. filter: invert(1) hue-rotate(180deg);
  495. background: none;
  496. }
  497. .noinvertdark {
  498. filter: none !important;
  499. }
  500. .nobg {
  501. background: none;
  502. }
  503. .lesson-sidebar {
  504. background: #222;
  505. }
  506. .lesson-main>blockquote {
  507. background-color: #1b1b44;
  508. }
  509. div.threejs_bottombar {
  510. background-color: #1b1b44;
  511. }
  512. div.threejs_bottombar code {
  513. background-color: #348;
  514. }
  515. .lesson-comment-notes {
  516. background: #222;
  517. }
  518. input[type=text] {
  519. background: #444;
  520. color: white;
  521. border: none;
  522. padding: 3px;
  523. }
  524. }
粤ICP备19079148号