From 290f849c64c9f198f09b592daa48ecdae957375f Mon Sep 17 00:00:00 2001 From: Radu Date: Fri, 24 Nov 2023 16:52:57 -0500 Subject: 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. --- styles.css | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'styles.css') diff --git a/styles.css b/styles.css index a63efc9..0a1aad4 100644 --- a/styles.css +++ b/styles.css @@ -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: " "; +} -- cgit v1.2.3