diff options
author | Radu <radu@pml4t.net> | 2023-11-24 16:52:57 -0500 |
---|---|---|
committer | Radu <radu@pml4t.net> | 2023-11-24 22:17:59 -0500 |
commit | 290f849c64c9f198f09b592daa48ecdae957375f (patch) | |
tree | fab417d5837cde3cd9b4db54dd61d59ca098a69d /styles.css | |
parent | ef17d1d29212f5dc0218bfca1c30709e5a35f7b2 (diff) |
Support GFM using `remarked` and fix some bugs
- This avoids edge cases in the primitive parser I wrote.
- Add KaTeX stylesheet (cause of rendering issues, not Pronto).
- Bundle with Webpack.
Diffstat (limited to 'styles.css')
-rw-r--r-- | styles.css | 42 |
1 files changed, 32 insertions, 10 deletions
@@ -1,12 +1,3 @@ -@font-face { - font-family: "STIXTwoMath"; - src: url("STIXTwoMath-Regular.otf"); -} - -math { - font-family: "STIXTwoMath"; -} - code.hljs { padding: 2px; border-radius: 2px; @@ -17,6 +8,37 @@ pre code.hljs { border-radius: 0.5em; } -pre.code-block { +:not(.katex-display) > .katex { + font-size: 1em; +} + +.message-content { + width: 100% !important; +} + +.message-parts-container { + counter-reset: katexEqnNo mmlEqnNo; /* Reset equation counter per message */ + white-space: normal; +} + +.message-parts-container > * { margin: 0.5em 0; } + +:is(.message-parts-container, .parent-text) a { + color: #1083c7; + text-decoration: none; +} + +:is(.message-parts-container, .parent-text) > :first-child { + margin-top: 0; +} + +:is(.message-parts-container, .parent-text) > :nth-last-child(-n + 1 of :not(.edited)) { + display: inline; /* Allow '(edited)' to follow on same line */ + margin-bottom: 0; +} + +.edited::before { + content: " "; +} |