style.css 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /* inspired by https://blog.koley.in/2019/339-bytes-of-responsive-css
  2. * and https://www.gwern.net/Design */
  3. :root {
  4. --GW-base-font-size: 15pt;
  5. --GW-body-color: #224;
  6. --GW-body-link-color: var(--GW-body-color);
  7. --GW-body-text-color: var(--GW-body-color);
  8. --GW-body-text-font-size: 1rem;
  9. --GW-dotted-underline-background-image: url('data:image/gif;base64,R0lGODlhBAACAPAAMYiIiP///ywAAAAABAACAAACBAQShgUAOw==');
  10. --GW-link-underline-gradient-line-color: #338;
  11. --GW-monospaced-font-stack: "IBM Plex Mono", "Liberation Mono", "Consolas", "Courier", monospace, "Noto Emoji", "Quivira";
  12. --GW-sans-serif-font-stack: "Lucida Sans Unicode", "Source Sans Pro", "Helvetica", "Trebuchet MS", sans-serif, "Noto Emoji", "Quivira";
  13. --GW-serif-font-stack: "Source Serif Pro", "Apple Garamond", "Baskerville", "Libre Baskerville", "Droid Serif", "Times New Roman", "Times", serif, "Noto Emoji", "Quivira";
  14. }
  15. html {
  16. background-color: lch(86.301% 131.68 58.754);
  17. background-color: rgb(100% 80.49% 66.95%);
  18. background-color: #EEE;
  19. color: var(--GW-body-text-color);
  20. font-size: var(--GW-base-font-size);
  21. font-weight: 400;
  22. font-family: var(--GW-serif-font-stack);
  23. }
  24. body {
  25. background-color: #f8f8f8;
  26. color: var(--GW-body-color);
  27. line-height: 1.6;
  28. margin: auto;
  29. max-width: 800px;
  30. max-width: 40rem;
  31. padding: 1rem;
  32. }
  33. h1 {
  34. font-feature-settings: 'smcp';
  35. font-size: 1.75em;
  36. font-variant: small-caps;
  37. letter-spacing: -0.75px;
  38. line-height: 1.25;
  39. }
  40. h1, h2, strong { color: #111; }
  41. /* header and footer areas */
  42. .terms { font-size: .9em; }
  43. .menu { padding: 0; }
  44. .menu li { display: inline-block; }
  45. .article-meta, .menu a {
  46. background: #eee;
  47. border-radius: 5px;
  48. padding: 5px;
  49. text-decoration: none;
  50. }
  51. .menu, .article-meta, #footer { text-align: center; }
  52. .title { font-size: 24pt; }
  53. hr {
  54. border-style: dashed;
  55. color: #ddd;
  56. }
  57. p {
  58. line-height: 1.50;
  59. }
  60. em {
  61. letter-spacing: 0.75px;
  62. }
  63. /* code */
  64. code {
  65. font-size: 12pt;
  66. }
  67. pre {
  68. border: 1px solid #ddd;
  69. box-shadow: 5px 5px 5px #eee;
  70. }
  71. pre code { background: none; }
  72. code[class*="language-"], pre[class*="language-"] {
  73. font-size: 10pt;
  74. }
  75. /* misc elements */
  76. img, iframe, video { max-width: 100%; }
  77. main { hyphens: auto; }
  78. blockquote {
  79. background: #f9f9f9;
  80. border-left: 5px solid #ccc;
  81. font-style: italic;
  82. padding: 3px 1em 3px;
  83. }
  84. ul { padding: 1em; }
  85. ul.main,ul.terms {
  86. list-style-type: none;
  87. padding: 0em;
  88. }
  89. table {
  90. border-bottom: 1px solid #666;
  91. border-top: 1px solid #666;
  92. margin: auto;
  93. }
  94. table thead th { border-bottom: 1px solid #ddd; }
  95. th, td { padding: 5px; }
  96. thead, tfoot, tr:nth-child(even) { background: #eee; }
  97. a:any-link {
  98. /* gentle underlines https://www.gwern.net/Design */
  99. /* background-image: linear-gradient(var(--GW-link-underline-gradient-line-color), var(--GW-link-underline-gradient-line-color)); */
  100. /* background-image: var(--GW-dotted-underline-background-image); */
  101. /* background-position: 0% 100%;
  102. background-repeat: repeat-x;
  103. background-size: 1px 0.1ex; */
  104. border-bottom: 0.2ex dotted var(--GW-link-underline-gradient-line-color);
  105. color: var(--GW-body-link-color);
  106. text-decoration: none;
  107. }
  108. /* https://discourse.gohugo.io/t/handling-images-size-aligning/1940/2 */
  109. img[src$='#height50'] {
  110. height: 50px;
  111. padding: 1ex;
  112. }
  113. img[src$='#height24'] {
  114. height: 24px;
  115. /* margin-bottom: -0.65ex; */
  116. }
  117. iframe#comments {
  118. border: 0;
  119. width: 100%;
  120. height: 200px;
  121. margin: 0 -1ex;
  122. }
  123. /* Tag cloud */
  124. ul.terms {
  125. list-style-type: none;
  126. margin: 0;
  127. padding: 0;
  128. }
  129. ul.terms > li { display: inline; }
  130. @media only screen and (max-width: 590px) {
  131. blockquote {
  132. margin: 2ex 0;
  133. }
  134. }