Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
katex: Properly align timestamps with KaTeX-only messages.
Karl Stolley1878f920a8b1
diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.cssindex 0a7f4d2fde3..2013a73f423 100644--- a/web/styles/rendered_markdown.css+++ b/web/styles/rendered_markdown.css@@ -407,8 +407,9 @@`.rendered_markdown` out of the baseline groupformed with EDITED/MOVED markers and thetimestamp when the first child of the rendered- markdown is a media element. */- &:has(> .message_inline_image:first-child) {+ markdown is a media element or KaTeX. */+ &:has(> .message_inline_image:first-child),+ &:has(> p:first-child > .katex-display) {align-self: center;}@@ -416,6 +417,13 @@we provide a small layout hack using aninline grid. */@supports not selector(:has(*)) {+ p:first-child > .katex-display {+ /* KaTeX should take up 100% of the message box,+ so that KaTeX's own CSS for centering still works. */+ width: 100%;+ }++ p:first-child > .katex-display,.message_inline_image {/* We'll display this bit of media asan inline grid. That will allow us@@ -437,6 +445,7 @@grid-template: "media" minmax(0, auto) / minmax(0, auto);}+ p:first-child > .katex-display > .katex,.message_inline_image a,.message_inline_image video {/* We explicitly place the containing@@ -444,6 +453,7 @@grid-area: media;}+ p:first-child > .katex-display::before,.message_inline_image::before {/* We generate a single . here to createtext content enough for a baseline.