logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git

index.css (4570B)


  1. /* BEGIN css/colorscheme.css */
  2. :root {
  3. /* gruvbox dark */
  4. --ansi00: #282828;
  5. --ansi00-hard: #1d2021;
  6. --ansi00-soft: #32302f;
  7. --ansi01: #cc241d;
  8. --ansi02: #98971a;
  9. --ansi03: #d79921;
  10. --ansi04: #458588;
  11. --ansi05: #b16286;
  12. --ansi06: #689d6a;
  13. --ansi07: #a89984;
  14. --ansi08: #928374;
  15. --ansi09: #fb4934;
  16. --ansi10: #b8bb26;
  17. --ansi11: #fabd2f;
  18. --ansi12: #83a598;
  19. --ansi13: #d3869b;
  20. --ansi14: #8ec07c;
  21. --ansi15: #ebdbb2;
  22. }
  23. @media (prefers-color-scheme: light) {
  24. :root {
  25. /* gruvbox light */
  26. --ansi00: #fbf1c7;
  27. --ansi00-hard: #f9f5d7;
  28. --ansi00-soft: #f2e5bc;
  29. --ansi01: #cc241d;
  30. --ansi02: #98971a;
  31. --ansi03: #d79921;
  32. --ansi04: #458588;
  33. --ansi05: #b16286;
  34. --ansi06: #689d6a;
  35. --ansi07: #7c6f64;
  36. --ansi08: #928374;
  37. --ansi09: #9d0006;
  38. --ansi10: #79740e;
  39. --ansi11: #b57614;
  40. --ansi12: #076678;
  41. --ansi13: #8f3f71;
  42. --ansi14: #427b58;
  43. --ansi15: #3c3836;
  44. }
  45. }
  46. /* END css/colorscheme.css */
  47. /* Because sometimes non-semantic colors happens
  48. * Like in /notes/vocabulary-jp: Tetris-CC-Sakura-EH.xhtml
  49. */
  50. font[color=green] { color: var(--ansi10) }
  51. /* elements */
  52. a {
  53. color: var(--ansi13);
  54. outline-color: invert;
  55. outline-color: var(--ansi11);
  56. }
  57. summary { cursor: pointer; } /* for some reason this isn't in webkit */
  58. abbr {
  59. text-decoration: underline;
  60. text-decoration: dotted underline;
  61. text-decoration-color: var(--ansi02);
  62. cursor: help;
  63. }
  64. body, html {
  65. background-color: var(--ansi00-hard);
  66. color: var(--ansi15);
  67. margin: 0;
  68. padding: 0;
  69. }
  70. blockquote {
  71. border-left: 0.1em solid;
  72. padding-left: 0.5em;
  73. }
  74. code, pre {
  75. background-color: var(--ansi00);
  76. color: var(--ansi15);
  77. font-family: monospace;
  78. }
  79. code { padding: 0 0.25em; }
  80. pre {
  81. display: table;
  82. /* pre-wrap is there for legacy reasons as break-spaces is recent */
  83. white-space: pre-wrap;
  84. white-space: break-spaces;
  85. word-break: break-all;
  86. }
  87. .inline-sections article,
  88. .inline-sections section {
  89. display: inline-table;
  90. }
  91. .box-center h1,
  92. .box-center h2 {
  93. text-align: center;
  94. }
  95. article, main, .box-center {
  96. margin: 1.5rem auto;
  97. }
  98. article, body > section, main {
  99. padding: 0.5rem;
  100. background-color: var(--ansi00-soft);
  101. display: table;
  102. vertical-align: top;
  103. }
  104. article, main, body > section { max-width: 80em; }
  105. article .timestamps { font-size: small; }
  106. section h1, section h2, section h3, section h4, section h5, section h6 {
  107. margin-block: 0.25em;
  108. }
  109. table {
  110. border-collapse: collapse;
  111. }
  112. thead {
  113. position: sticky;
  114. top: 0;
  115. color: var(--ansi15);
  116. background-color: var(--ansi00-hard);
  117. }
  118. td, th {
  119. border: 2pt solid var(--ansi00-hard);
  120. padding: 0.25em;
  121. }
  122. tbody tr:nth-child(odd) {
  123. background-color: var(--ansi00-soft);
  124. }
  125. tbody tr:nth-child(even) {
  126. background-color: var(--ansi00);
  127. }
  128. thead td, thead th {
  129. border: none;
  130. }
  131. td.date, th.date {
  132. /* YYYY-MM-DD -> 10 characters, of roughly the width of '0' */
  133. min-width: 10ch;
  134. }
  135. rt,rp { font-size: 75%; }
  136. kbd, samp {
  137. user-select: all;
  138. user-select: contain;
  139. }
  140. kbd { font-weight: bold; }
  141. /* selectors */
  142. h1:target, h2:target, h3:target, h4:target, h5:target, h6:target {
  143. color: var(--ansi03);
  144. }
  145. section { border: 1px dashed transparent; }
  146. section:target { border: 1px dashed var(--ansi03); }
  147. /* classes */
  148. .select-all {
  149. user-select: all;
  150. }
  151. .warn { border-bottom: 1pt solid var(--ansi01); }
  152. dl.list dt {
  153. display: list-item;
  154. list-style-type: disc;
  155. list-style-position: inside;
  156. }
  157. dl[compact] dt,
  158. dl[compact] dd {
  159. display: inline;
  160. }
  161. dl[compact] dt { font-weight: bold; }
  162. dl[compact] dd { margin-inline-start: 2em; }
  163. /* break between items */
  164. dl[compact] dt:before {
  165. content: ' ';
  166. display: block;
  167. }
  168. img.thumb_inline {
  169. max-width: 45%;
  170. object-fit: contain;
  171. margin: 0.5em;
  172. }
  173. .math {
  174. font-family: math, "CMU Typewriter Text", "STIX Two Math", "Lucida Math", monospace;
  175. }
  176. .right { float: right; }
  177. /* footnote */
  178. .fn {
  179. font-size: small;
  180. vertical-align: super;
  181. }
  182. /* ids */
  183. #bio { clear: both; }
  184. #avatar {
  185. float: left;
  186. margin: 1em;
  187. margin-right: 2em;
  188. }
  189. /* Images/Figures */
  190. figure {
  191. text-align: center;
  192. margin: auto;
  193. }
  194. figcaption {
  195. display: table;
  196. margin: auto;
  197. }
  198. #art {
  199. border: none;
  200. text-align: center;
  201. }
  202. #art img, figure img {
  203. max-width: 100%;
  204. max-height: 100%;
  205. object-fit: scale-down;
  206. }
  207. nav, footer {
  208. background-color: var(--ansi00);
  209. color: var(--ansi15);
  210. }
  211. header {
  212. text-align: center;
  213. background-color: var(--ansi00);
  214. color: var(--ansi06);
  215. }
  216. /* navbar */
  217. nav {
  218. font-size: larger;
  219. font-weight: bold;
  220. margin: 0 0 1rem 1rem;
  221. float: right;
  222. }
  223. nav, .indexlist {
  224. line-height: 1.5;
  225. }
  226. /* footer */
  227. footer {
  228. margin-top: 1rem;
  229. padding: 0.5em 0;
  230. text-align: center;
  231. clear: both;
  232. }