mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	katex: Properly align timestamps with KaTeX-only messages.
This commit is contained in:
		@@ -407,8 +407,9 @@
 | 
				
			|||||||
       `.rendered_markdown` out of the baseline group
 | 
					       `.rendered_markdown` out of the baseline group
 | 
				
			||||||
       formed with EDITED/MOVED markers and the
 | 
					       formed with EDITED/MOVED markers and the
 | 
				
			||||||
       timestamp when the first child of the rendered
 | 
					       timestamp when the first child of the rendered
 | 
				
			||||||
       markdown is a media element. */
 | 
					       markdown is a media element or KaTeX. */
 | 
				
			||||||
    &:has(> .message_inline_image:first-child) {
 | 
					    &:has(> .message_inline_image:first-child),
 | 
				
			||||||
 | 
					    &:has(> p:first-child > .katex-display) {
 | 
				
			||||||
        align-self: center;
 | 
					        align-self: center;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -416,6 +417,13 @@
 | 
				
			|||||||
       we provide a small layout hack using an
 | 
					       we provide a small layout hack using an
 | 
				
			||||||
       inline grid. */
 | 
					       inline grid. */
 | 
				
			||||||
    @supports not selector(:has(*)) {
 | 
					    @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 {
 | 
					        .message_inline_image {
 | 
				
			||||||
            /* We'll display this bit of media as
 | 
					            /* We'll display this bit of media as
 | 
				
			||||||
               an inline grid. That will allow us
 | 
					               an inline grid. That will allow us
 | 
				
			||||||
@@ -437,6 +445,7 @@
 | 
				
			|||||||
            grid-template: "media" minmax(0, auto) / minmax(0, auto);
 | 
					            grid-template: "media" minmax(0, auto) / minmax(0, auto);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        p:first-child > .katex-display > .katex,
 | 
				
			||||||
        .message_inline_image a,
 | 
					        .message_inline_image a,
 | 
				
			||||||
        .message_inline_image video {
 | 
					        .message_inline_image video {
 | 
				
			||||||
            /* We explicitly place the containing
 | 
					            /* We explicitly place the containing
 | 
				
			||||||
@@ -444,6 +453,7 @@
 | 
				
			|||||||
            grid-area: media;
 | 
					            grid-area: media;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        p:first-child > .katex-display::before,
 | 
				
			||||||
        .message_inline_image::before {
 | 
					        .message_inline_image::before {
 | 
				
			||||||
            /* We generate a single . here to create
 | 
					            /* We generate a single . here to create
 | 
				
			||||||
               text content enough for a baseline.
 | 
					               text content enough for a baseline.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user