File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,21 @@ class _KatexParser {
356356 }
357357 }
358358
359- // TODO(#1716) Handle styling for .vlist-t2 spans
359+ // The katex.css has .vlist-t2 and .vlist-s classes for working around
360+ // Safari rendering issues. In HTML the .vlist-t2 class will be present
361+ // along with the .vlist-t class, and .vlist-s class will be present on
362+ // an empty span in the first (of the two) .vlist-r span.
363+ //
364+ // The KaTeX implementation confirms that both classes are always
365+ // present in tandem. And by experimenting via browser devtools and
366+ // the CSS definition and, it can be confirmed that both cancel each
367+ // others effect of the 2px shift.
368+ // See:
369+ // https://github.com/KaTeX/KaTeX/blob/9fb63136e/src/buildCommon.js#L596-L620
370+ // https://github.com/KaTeX/KaTeX/commit/766487bfe
371+ //
372+ // So, we ignore these classes, as those workarounds aren't needed.
373+
360374 return KatexVlistNode (
361375 rows: rows,
362376 debugHtmlNode: kDebugMode ? element : null ,
You can’t perform that action at this time.
0 commit comments