You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
4.6 KiB

4 years ago
  1. html {
  2. box-sizing: border-box;
  3. }
  4. *,
  5. *:before,
  6. *:after {
  7. box-sizing: inherit;
  8. }
  9. body {
  10. margin: 0;
  11. padding: 0;
  12. font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace;
  13. font-size: 1rem;
  14. line-height: 1.54;
  15. letter-spacing: -0.02em;
  16. background-color: color-mod(var(--accent) blend(#1D1E28 98%));
  17. color: var(--color);
  18. text-rendering: optimizeLegibility;
  19. -webkit-font-smoothing: antialiased;
  20. font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl";
  21. font-variant-ligatures: contextual;
  22. -webkit-overflow-scrolling: touch;
  23. -webkit-text-size-adjust: 100%;
  24. @media (--phone) {
  25. font-size: 1rem;
  26. }
  27. }
  28. .headings--one-size {
  29. h1,
  30. h2,
  31. h3,
  32. h4,
  33. h5,
  34. h6 {
  35. line-height: 1.3;
  36. &:not(first-child) {
  37. margin-top: 40px;
  38. }
  39. }
  40. h1,
  41. h2,
  42. h3 {
  43. font-size: 1.4rem;
  44. }
  45. h4,
  46. h5,
  47. h6 {
  48. font-size: 1.2rem;
  49. }
  50. }
  51. a {
  52. color: inherit;
  53. /* Waiting for a better times... */
  54. /* &:has(code) {
  55. text-decoration-color: var(--accent);
  56. } */
  57. }
  58. img {
  59. display: block;
  60. max-width: 100%;
  61. &.left {
  62. margin-right: auto;
  63. }
  64. &.center {
  65. margin-left: auto;
  66. margin-right: auto;
  67. }
  68. &.right {
  69. margin-left: auto;
  70. }
  71. }
  72. p {
  73. margin-bottom: 20px;
  74. }
  75. figure {
  76. display: table;
  77. max-width: 100%;
  78. margin: 25px 0;
  79. &.left {
  80. margin-right: auto;
  81. }
  82. &.center {
  83. margin-left: auto;
  84. margin-right: auto;
  85. }
  86. &.right {
  87. margin-left: auto;
  88. }
  89. figcaption {
  90. font-size: 14px;
  91. padding: 5px 10px;
  92. margin-top: 5px;
  93. background: var(--accent);
  94. color: var(--background);
  95. /* opacity: .8; */
  96. &.left {
  97. text-align: left;
  98. }
  99. &.center {
  100. text-align: center;
  101. }
  102. &.right {
  103. text-align: right;
  104. }
  105. }
  106. }
  107. code, kbd {
  108. font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace;
  109. font-feature-settings: normal;
  110. background: color-mod(var(--accent) a(20%));
  111. color: var(--accent);
  112. padding: 1px 6px;
  113. margin: 0 2px;
  114. font-size: .95rem;
  115. code, kbd {
  116. background: transparent;
  117. padding: 0;
  118. margin: 0;
  119. }
  120. }
  121. pre {
  122. background: transparent !important;
  123. padding: 20px 10px;
  124. margin: 40px 0;
  125. font-size: .95rem;
  126. overflow: auto;
  127. border-top: 1px solid rgba(255, 255, 255, .1);
  128. border-bottom: 1px solid rgba(255, 255, 255, .1);
  129. + pre {
  130. border-top: 0;
  131. margin-top: -40px;
  132. }
  133. @media (--phone) {
  134. white-space: pre-wrap;
  135. word-wrap: break-word;
  136. }
  137. code {
  138. background: none !important;
  139. margin: 0;
  140. padding: 0;
  141. font-size: inherit;
  142. border: none;
  143. }
  144. }
  145. blockquote {
  146. border-top: 1px solid var(--accent);
  147. border-bottom: 1px solid var(--accent);
  148. margin: 40px 0;
  149. padding: 25px;
  150. @media (--phone) {
  151. padding-right: 0;
  152. }
  153. p:first-of-type {
  154. margin-top: 0;
  155. }
  156. p:last-of-type {
  157. margin-bottom: 0;
  158. }
  159. p {
  160. position: relative;
  161. }
  162. p:first-of-type:before {
  163. content: '>';
  164. display: block;
  165. position: absolute;
  166. left: -25px;
  167. color: var(--accent);
  168. }
  169. &.twitter-tweet {
  170. position: relative;
  171. background: color-mod(var(--accent) a(10%));
  172. font: inherit;
  173. color: inherit;
  174. border: 1px solid var(--accent);
  175. padding-top: 60px;
  176. p:before {
  177. content: '';
  178. }
  179. &:before {
  180. content: '> From Twitter:';
  181. position: absolute;
  182. top: 20px;
  183. color: var(--accent);
  184. font-weight: bold;
  185. }
  186. a {
  187. color: var(--accent);
  188. }
  189. }
  190. }
  191. table {
  192. table-layout: auto;
  193. border-collapse: collapse;
  194. width: 100%;
  195. margin: 40px 0;
  196. }
  197. table,
  198. th,
  199. td {
  200. border: 1px dashed var(--accent);
  201. padding: 10px;
  202. }
  203. th {
  204. color: var(--accent);
  205. }
  206. ul,
  207. ol {
  208. margin-left: 30px;
  209. padding: 0;
  210. li {
  211. position: relative;
  212. }
  213. @media (--phone) {
  214. margin-left: 20px;
  215. }
  216. }
  217. ol {
  218. list-style: none;
  219. counter-reset: li;
  220. li {
  221. counter-increment: li;
  222. }
  223. li:before {
  224. content: counter(li);
  225. position: absolute;
  226. right: calc(100% + 10px);
  227. color: var(--accent);
  228. display: inline-block;
  229. text-align: right;
  230. }
  231. }
  232. ol ol {
  233. list-style-type: lower-alpha;
  234. }
  235. mark {
  236. background: var(--accent);
  237. color: var(--background);
  238. }
  239. .container {
  240. display: flex;
  241. flex-direction: column;
  242. padding: 40px;
  243. max-width: 864px;
  244. min-height: 100vh;
  245. border-right: 1px solid rgba(255, 255, 255, 0.1);
  246. &.full,
  247. &.center {
  248. border: none;
  249. margin: 0 auto;
  250. }
  251. &.full {
  252. max-width: 100%;
  253. }
  254. @media (--phone) {
  255. padding: 20px;
  256. }
  257. @media print {
  258. display: initial;
  259. }
  260. }
  261. .content {
  262. display: flex;
  263. flex-direction: column;
  264. @media print {
  265. display: initial;
  266. }
  267. }
  268. hr {
  269. width: 100%;
  270. border: none;
  271. background: var(--border-color);
  272. height: 1px;
  273. }
  274. .hidden {
  275. display: none;
  276. }