style.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. @import "reset.css";
  2. /*
  3. THIS CSS FILE DOES NOT CONTAIN ANY COLOR DEFINITIONS - see index.twig
  4. ALL DEFAULT STYLES ARE FOR THE SMALLEST DEVICE, A SMARTPHONE THAT REGISTERS AS min-width 320px AND LESS THAN 29em
  5. OR A DESKTOP BROWSER RESIZED TO 320px WIDTH
  6. */
  7. :root {
  8. --sans: Cantarell, Lato, "Noto Sans", "Nunito Sans", sans-serif;
  9. --mono: "JetBrains Mono NL","Cascadia Mono PL","Fira Code","Noto Sans Mono","Droid Sans Mono", Consolas, "Andale Mono", "DejaVu Sans Mono", Monaco, monospace;
  10. --bw: 1px; /* default border width, also hr */
  11. }
  12. * {
  13. box-sizing: border-box;
  14. }
  15. html,body {
  16. height:100%;
  17. width:100%;
  18. }
  19. body {
  20. font-family: var(--sans);
  21. /* footer stay down, even with dynamic footer height:; stackoverflow.com/a/20352949 */
  22. display: flex;
  23. flex-direction: column;
  24. tab-size: 4;
  25. }
  26. /* For stylesheets outside of <head> - but is this necessary? */
  27. style,link {
  28. display: none;
  29. }
  30. /*
  31. COLORS
  32. fallback colors: base16-equilibrium-light
  33. License: MIT, copyright Carlo Abelli
  34. */
  35. body {
  36. color: var(--base05,#43474e); background: var(--base00,#f5f0e7)
  37. }
  38. article.list > a > :not(h1),
  39. .tag_cloud li a,
  40. div.footnotes ol>li>* {
  41. color: var(--base05,#43474e)
  42. }
  43. h1,h2,h3,h4,h5,h6,summary {
  44. color: var(--base03,#73777f)
  45. }
  46. code,pre {
  47. color: var(--base0d,#0073b5); background: var(--base01,#e7e2d9)
  48. }
  49. a,
  50. article.list h1:first-child,
  51. label[for=menu-icon]:hover,
  52. .four04,
  53. .p01-contact .required label:after,
  54. a>code,
  55. #toc ul li,
  56. input#titlesonly[type=checkbox]:checked ~ label::before,
  57. input,
  58. textarea,
  59. select,
  60. div.footnotes ol>li {
  61. color:var(--base09,#bf3e05)
  62. }
  63. code::selection,
  64. pre::selection {
  65. background: var(--base0d,#0073b5);
  66. color: var(--base01,#e7e2d9)
  67. }
  68. ::selection {
  69. background: var(--base05,#43474e);
  70. color: var(--base00,#f5f0e7)
  71. }
  72. button,
  73. .p01-contact input[type=submit]:not([type=radio]):not([type=checkbox]),
  74. .p01-contact input[type=button]:not([type=radio]):not([type=checkbox]) {
  75. color: var(--base00,#f5f0e7);
  76. background: var(--base09,#bf3e05)
  77. }
  78. #toc,
  79. blockquote,
  80. kbd,
  81. article.list:hover,
  82. input[type=checkbox]:checked~label,
  83. nav#menu-icon,
  84. input,
  85. textarea,
  86. select,
  87. .box,
  88. table,
  89. header,
  90. footer,
  91. .small span,
  92. input.submit {
  93. background:var(--base01,#e7e2d9)
  94. }
  95. input[type=checkbox] {
  96. accent-color:var(--base09,#bf3e05)
  97. }
  98. details,
  99. blockquote,
  100. kbd,
  101. aside,
  102. pre,
  103. .border,
  104. input,
  105. textarea,
  106. select,
  107. th,
  108. td,
  109. #toc {
  110. border-color: var(--base02,#d8d4cb)
  111. }
  112. div.corner {
  113. color: var(--base0B,#637200)
  114. }
  115. .tag_cloud li span:last-child {
  116. color: var(--base03,#73777f)
  117. }
  118. .tag_cloud li a:hover,
  119. .tag_cloud li a:hover span:last-child {
  120. color: var(--base06,#2c3138)
  121. }
  122. input:focus,
  123. textarea:focus,
  124. select:focus {
  125. border-color:var(--base09,#bf3e05)
  126. }
  127. header .inner .sitelogo svg {
  128. fill: var(--base00,#f5f0e7)
  129. }
  130. hr {
  131. background: var(--base02,#d8d4cb);
  132. }
  133. /* WEBKIT SPECIFIC SCROLLBAR */
  134. /* Firefox knows how to style the scrollbar: it becomes wider only on hover, and
  135. * fades out otherwise. Chromium doesn't do that. I tried here to make it less
  136. * obnoxious, but my experience with webkit browsers is limited. If you have
  137. * any idea how to improve this, please open an issue or a pull request. */
  138. ::-webkit-scrollbar { width: 0.5em; height:0.5em; }
  139. ::-webkit-scrollbar-thumb {
  140. border-radius: 10px;
  141. }
  142. /*************** MOBILE FIRST !!! MOBILE FIRST !!! ************************/
  143. /*HTML tags*/
  144. h1,h2 {
  145. font-size: 2em;
  146. line-height: 1.3em;
  147. padding: 1em 0 .5em;
  148. }
  149. h3,h4,h5,h6 {
  150. padding: .5em 0;
  151. font-weight:bold
  152. }
  153. h3 {
  154. font-size: 1.4em;
  155. line-height: 1.2em;
  156. }
  157. h4 {
  158. font-size: 1.1em;
  159. line-height: 1em;
  160. }
  161. h5, h6 {
  162. font-size: 1em;
  163. line-height: 1em;
  164. }
  165. a, article.list > a:hover {
  166. text-decoration: none;
  167. }
  168. a:hover,
  169. .tag_cloud a:hover span:first-child,
  170. article.list a:hover h1 {
  171. text-decoration:underline solid .05rem;
  172. }
  173. /* see {notabug,framagit}.org/ohnonot/PicoTargetBlank
  174. a.external::after { line-height: 1em; vertical-align: super; font-size: .6em; content: "↗" }
  175. a.external.noarrow::after { content: '' }
  176. */
  177. details > :not(summary) { margin-left:4%!important }
  178. details summary { /* like h5 */
  179. padding: .5em 0;
  180. font-weight:bold;
  181. }
  182. /*
  183. MOSTLY header .inner
  184. */
  185. .flexbox {
  186. display:flex;
  187. height:100%;
  188. }
  189. .flexbox > * {
  190. align-self: center;
  191. }
  192. .flexbox > *:first-child {
  193. align-self: left;
  194. flex: 1 1 auto;
  195. }
  196. /*HEADER*/
  197. header .inner {
  198. height:3.75em;
  199. padding-left: .5em;
  200. }
  201. header ul, nav ul {
  202. list-style: none;
  203. padding:0;
  204. }
  205. header ul li {
  206. float: left;
  207. padding: .8em .3em .8em 0;
  208. font-size: 1.2em;
  209. }
  210. header ul li:last-of-type {
  211. padding-right: 0;
  212. }
  213. header ul li a {
  214. padding: .8em .5em .5em 0;
  215. }
  216. header .inner .sitelogo svg {
  217. height:100%;
  218. }
  219. header .inner .sitelogo {
  220. height:100%;
  221. margin: 0 .5em 0 0;
  222. padding:0;
  223. }
  224. /*
  225. not enough horizontal space on mobile/portrait:
  226. */
  227. header .inner .title {
  228. display:none;
  229. }
  230. /*
  231. CONTENT
  232. */
  233. p, .paragraph {
  234. padding:.5em 0;
  235. /* make sure paragraph stays within width constraints */
  236. word-wrap: break-word;
  237. }
  238. em,i {
  239. font-style: italic;
  240. padding-right:.1em;
  241. }
  242. strong,b {
  243. font-weight: bold;
  244. }
  245. code, pre, input#titlesonly[type=checkbox] ~ label::before {
  246. font-family: var(--mono);
  247. font-size: .9rem;
  248. }
  249. :not(pre) > code {
  250. padding: 0 0.15em;
  251. line-height:inherit;
  252. }
  253. :not(.four04) > pre {
  254. display: inline-block; /* stackoverflow.com/a/20673961 */
  255. margin: 0.4em 0;
  256. line-height:1.3em;
  257. border-width: var(--bw);
  258. border-style: solid;
  259. overflow: auto;
  260. max-width:100%;
  261. word-break: break-all;
  262. white-space: pre-wrap;
  263. }
  264. pre > code {
  265. display: block; /* stackoverflow.com/a/20673961 */
  266. margin: 0.4em;
  267. }
  268. blockquote {
  269. padding: 0.3em 0.3em 0 0.7em;
  270. border-width: 1px 1px 1px .9rem;
  271. border-style: solid solid solid double;
  272. margin: 0.5em 0;
  273. line-height: 1.3em;
  274. }
  275. kbd {
  276. font-family: var(--mono);
  277. padding: 0 0.2em 0 0.2em;
  278. border-width: var(--bw);
  279. border-style: solid;
  280. border-radius: 0.2em;
  281. margin: 0 0.1em;
  282. }
  283. ul,ol {
  284. padding: .25em 0 .75em 1.5em;
  285. }
  286. section.content > * {
  287. padding: .5em;
  288. }
  289. section.content {
  290. margin-bottom: 1.5em;
  291. }
  292. .small, aside {
  293. line-height: 1.4em;
  294. font-size: 0.8em;
  295. }
  296. .small span {
  297. padding: 0 0.2em;
  298. }
  299. .border,#toc {
  300. border-style: solid;
  301. border-width: var(--bw);
  302. }
  303. aside {
  304. border-bottom-style: solid;
  305. border-bottom-width: var(--bw);
  306. }
  307. .right {
  308. float:right;
  309. }
  310. .left {
  311. float:left;
  312. }
  313. li p {
  314. padding: 0;
  315. }
  316. /*
  317. ARTICLE
  318. */
  319. article h1:first-child {
  320. font-size: 2.5em;
  321. padding: 0 0 1em 0;
  322. line-height: 1.2em;
  323. }
  324. article h2:first-of-type {
  325. padding-top: .5em;
  326. }
  327. article li {
  328. padding: .1em;
  329. }
  330. section.content p, section.content .paragraph {
  331. padding:.2em 0 .5em 0;
  332. }
  333. article {
  334. line-height: 1.4em;
  335. }
  336. article p.description {
  337. padding-top: 0;
  338. }
  339. article aside {
  340. padding:0.1em 0;
  341. }
  342. article aside .tag {
  343. float:right;
  344. margin-left:0.5em;
  345. }
  346. article aside .date, article aside .author {
  347. float:left;
  348. }
  349. article aside .timeline {
  350. opacity:0.5;
  351. }
  352. article aside .author {
  353. margin-left:0.5em;
  354. }
  355. article.fullpage {
  356. margin-top: 1em;
  357. }
  358. article.fullpage aside {
  359. margin-bottom: 2em;
  360. }
  361. article.list {
  362. margin: 1em 0;
  363. }
  364. article.list h1 {
  365. padding:0 0 .1em 0;
  366. line-height:1em;
  367. }
  368. article img {
  369. max-width: 100%;
  370. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5), 0 3px 10px 0 rgba(0, 0, 0, 0.5);
  371. /* "Card" shadow from w3schools.com/css/css3_shadows_box.asp, sharpened */
  372. }
  373. article .noshadow, article .noshadow img {
  374. box-shadow: none;
  375. }
  376. article img.right, article img.left {
  377. float: none;
  378. }
  379. article img.small {
  380. max-width: 50%
  381. }
  382. /* Tables */
  383. table {
  384. margin:.5em 0 1em;
  385. }
  386. th {
  387. font-weight: bold;
  388. }
  389. th,td {
  390. padding: .4em;
  391. border: var(--bw) solid;
  392. }
  393. /* horizontal line */
  394. hr {
  395. margin: 1.5em 0;
  396. height:var(--bw);
  397. border-width:0;
  398. }
  399. /* Footnotes */
  400. sup {
  401. vertical-align: super;
  402. font: bold .7em var(--mono);
  403. margin: 0 0 0 0.1em;
  404. line-height: 1;
  405. }
  406. article sup>a {
  407. padding: 0 0.1em;
  408. }
  409. div.footnotes {
  410. font-size: .9em;
  411. }
  412. div.footnotes hr {
  413. margin-bottom:0
  414. }
  415. div.footnotes ol::before {
  416. content: "Footnotes";
  417. font-size:75%;
  418. text-transform:uppercase;
  419. }
  420. div.footnotes ol {
  421. line-height:75%;
  422. padding:0 1.5em 1.5em 0;
  423. }
  424. div.footnotes ol li:first-of-type {
  425. margin-top: 1em;
  426. }
  427. div.footnotes ol li {
  428. line-height:1.2em;
  429. margin-left: 1.5em;
  430. }
  431. div.footnotes ol li p {
  432. padding:0
  433. }
  434. div.footnotes pre div.corner {
  435. display:none;
  436. }
  437. div.footnotes ol a.footnote-backref {
  438. padding-left:.25em;
  439. }
  440. .tag_list {
  441. margin-bottom: 1em
  442. }
  443. /*
  444. TAG CLOUD
  445. */
  446. .tag_cloud > div, .tag_list > div {
  447. letter-spacing: .5em;
  448. font-size: 0.7em;
  449. margin-bottom: .5em;
  450. }
  451. .tag_cloud ul {
  452. word-break: break-all;
  453. font-weight:300; /* "Light" */
  454. }
  455. .tag_cloud li, .tag_cloud li span {
  456. display: inline-block;
  457. }
  458. /* this is the tag count of the tag cloud */
  459. .tag_cloud li span:last-child {
  460. font-size:0.6em;
  461. letter-spacing:-0.1em;
  462. font-family:var(--mono);
  463. margin:0 .4em 0 .1em;
  464. }
  465. .tag_cloud li a {
  466. display: block;
  467. min-height:1.5rem;
  468. }
  469. /* clickable menu*/
  470. input#menu-icon {
  471. display: none;
  472. }
  473. label[for="menu-icon"] {
  474. display: inline-block;
  475. width: 100%;
  476. padding:0.5em;
  477. }
  478. input#menu-icon[type=checkbox] ~ label::before {
  479. content: "→"
  480. }
  481. input#menu-icon[type=checkbox]:checked ~ label::before {
  482. content: "←"
  483. }
  484. nav#menu-icon {
  485. display: none;
  486. list-style: none;
  487. padding: .5em;
  488. }
  489. input#menu-icon[type=checkbox]:checked ~ nav#menu-icon {
  490. display: inline-block;
  491. }
  492. /*
  493. SEARCH
  494. */
  495. form#search_form input {
  496. margin: .1em 0;
  497. }
  498. input#titlesonly {
  499. display: none;
  500. }
  501. label[for="titlesonly"] {
  502. display: inline-block;
  503. margin-top:.4em;
  504. padding:0.25em 0.3em 0.2em 0.1em;
  505. }
  506. input#titlesonly[type=checkbox] ~ label::before {
  507. content: "[ ]";
  508. vertical-align:.075em;
  509. padding-right:.25em;
  510. }
  511. input#titlesonly[type=checkbox]:checked ~ label::before {
  512. content: "[X]";
  513. }
  514. /*
  515. paging
  516. */
  517. .paging {
  518. margin: 1em 0 0 0;
  519. position: relative;
  520. }
  521. .paging .previous {
  522. float: left;
  523. }
  524. .paging .next {
  525. float: right;
  526. }
  527. .paging span:nth-child(2) {
  528. /* same logic for .previous and .next */
  529. margin-left: 0.5em;
  530. }
  531. .paging .current {
  532. position: absolute;
  533. text-align: center;
  534. width:100%;
  535. z-index: -10;
  536. left:0;
  537. }
  538. /*
  539. FOOTER
  540. */
  541. footer .inner {
  542. padding: .5em;
  543. }
  544. footer {
  545. margin-top: auto;
  546. }
  547. footer p a {
  548. padding: 0.5em 0.2em;
  549. }
  550. footer .right {
  551. margin-left: 1em;
  552. }
  553. /* Input Styles */
  554. input,
  555. textarea,
  556. select {
  557. border-width: var(--bw) !important;
  558. border-style: solid !important;
  559. box-shadow:none !important;
  560. outline: none !important;
  561. margin: 0;
  562. font-size: 1em;
  563. border-radius: 0;
  564. }
  565. input:focus,
  566. textarea:focus,
  567. select:focus {
  568. border-width: var(--bw) !important;
  569. border-style: solid !important;
  570. box-shadow:none !important;
  571. outline: none !important;
  572. }
  573. /* remove stupid red border - stackoverflow.com/a/6189446 */
  574. input:required, input:invalid {
  575. box-shadow:none !important;
  576. outline: none !important;
  577. }
  578. button {
  579. padding: 0.5em;
  580. border: none;
  581. font-weight: bold;
  582. letter-spacing: 0.2em;
  583. }
  584. /*
  585. Display only for desktop type device widths
  586. */
  587. .desktop-device {
  588. display:none;
  589. }
  590. /*------------CLEARFIX!----------------*/
  591. .clearfix:before,.clearfix:after {
  592. content: " ";
  593. display: table;
  594. }
  595. .clearfix:after {
  596. clear: both;
  597. }
  598. .clearfix {
  599. *zoom: 1;
  600. }
  601. /* ################################################
  602. * B R E A K P O I N T S S T A R T H E R E *
  603. * ################################################ */
  604. /*
  605. THIS IS WHAT MY PHONE REGISTERS AS IN LANDSCAPE MODE
  606. */
  607. @media screen and (min-width: 480px) and (max-width: 1023px) {
  608. header .inner, footer .inner, section.content > *, label[for="menu-icon"], nav#menu-icon {
  609. /*just adding a little horizontal spacing*/
  610. padding-left: 1em;
  611. }
  612. }
  613. /*
  614. NON-MOBILE DEVICES (ALSO LAPTOPS) USUALLY START AT THIS BREAKPOINT
  615. */
  616. @media screen and (min-width: 768px) {
  617. .mobile-device {
  618. display:none;
  619. }
  620. .desktop-device {
  621. display:initial;
  622. }
  623. :not(.four04) > pre {
  624. min-width: 35%;
  625. }
  626. pre > code {
  627. margin: 0.55em;
  628. }
  629. ul,ol {
  630. padding: .5em .5em 1.5em 1.5em;
  631. }
  632. article li {
  633. padding: .2em;
  634. }
  635. header .inner {
  636. height:4.7em;
  637. }
  638. body > .inner {
  639. padding: 1em 0;
  640. position:relative;
  641. }
  642. section#sidebar {
  643. float: left;
  644. width: 33%;
  645. height:100% /* required for #back_up becoming sticky */
  646. }
  647. label[for="menu-icon"] {
  648. display:none;
  649. }
  650. nav#menu-icon {
  651. display: inline-block;
  652. position:initial;
  653. height:100% /* required for #back_up becoming sticky */
  654. }
  655. .back_up {
  656. position:sticky;
  657. top:0;
  658. padding:1em 1em 1em 0;
  659. }
  660. .back_up > a {
  661. padding:1em 1em 1em 0;
  662. }
  663. section.content {
  664. float: right;
  665. width: 67%;
  666. }
  667. article img {
  668. margin: 0.25em 0.5em 0.25em 0;
  669. }
  670. article img.right, article img.left {
  671. max-width: 50%;
  672. }
  673. article img.right {
  674. float: right;
  675. margin: 0.3em 0 1em 1em;
  676. }
  677. article img.left {
  678. float: left;
  679. margin: 0.3em 1em 0.2em 0;
  680. }
  681. article h1:first-child {
  682. margin-right: .5em; /* it's not nice when it gets too close to the right edge */
  683. }
  684. /*
  685. WIDE ENOUGH TO NOT USE 100% WIDTH
  686. */
  687. @media screen and (min-width: 1024px) {
  688. .inner {
  689. width:90%;
  690. margin: 0 auto;
  691. }
  692. article img.small { max-width: 30% }
  693. .flexbox > * {
  694. flex: 1 0 auto;
  695. }
  696. .flexbox > *:last-child {
  697. flex: 0 1 auto;
  698. }
  699. header .inner .title {
  700. display: initial;
  701. padding-right: .5em;
  702. font-size: 1.6em;
  703. }
  704. header .inner ul li {
  705. font-size: 1.3em;
  706. }
  707. }