Skip to content

Commit

Permalink
webview styles: Let LaTeX equations scroll horizontally.
Browse files Browse the repository at this point in the history
Currently a long LaTeX equation gets cut off from the right
instead of scrolling.

So, add horizontal scrolling effect.Also take care of bug
involving vertical cut off of superscripts in same way as
zulip web zulip/zulip#17829 .

Fixes: #4017
Signed-off-by: rajprakash00 <[email protected]>
  • Loading branch information
rajprakash00 authored and gnprice committed Mar 31, 2021
1 parent 10b30e7 commit 0250600
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/webview/static/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,16 @@ hr {
border-radius: 0.5rem;
}

/* LaTeX styling */
.katex-display {
/* KaTeX sometimes overdraws its bounding box by a little, so we
enlarge its scrolling area by stealing 3px from the margin
of the enclosing <p>. */
margin: -3px 0;
padding: 3px 0;
overflow: auto hidden;
}

/* Taken from the `.spoiler-block` section of the webapp's styles, as
of zulip/zulip@1cb040647, translated from SCSS to plain CSS. */
.spoiler-block {
Expand Down

0 comments on commit 0250600

Please sign in to comment.