lesson.css 13 KB

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