When a \rule has a height argument, its vertical alignment seems to be off:

You can see the issue without \frac or \color, I just used them to highlight the issue.
Here is a similar expression in latex:

rendered with:
\documentclass{article}
\usepackage{color}
\begin{document}
$$
\frac{\textcolor{blue}{\rule{2em}{2em}}}{2}
$$
\end{document}
The katex screenshot was taken from the katex homepage today, and I've seen the same thing running version 0.7.1 (I'm not sure if the github pages has the most up to date version).
I'd love to help fix this if possible, but my fear is that it's a very subtle and complicated CSS issue. My guess is to look at the rule for \rule in the buildHTML? Specifically, I thought this function might be important:
https://github.com/Khan/KaTeX/blob/master/src/buildHTML.js#L1319
I don't know if this is a known issue, I couldn't find it searching, so sorry if this is a duplicate.
When a
\rulehas a height argument, its vertical alignment seems to be off:You can see the issue without
\fracor\color, I just used them to highlight the issue.Here is a similar expression in latex:
rendered with:
The katex screenshot was taken from the katex homepage today, and I've seen the same thing running version
0.7.1(I'm not sure if the github pages has the most up to date version).I'd love to help fix this if possible, but my fear is that it's a very subtle and complicated CSS issue. My guess is to look at the rule for
\rulein thebuildHTML? Specifically, I thought this function might be important:https://github.com/Khan/KaTeX/blob/master/src/buildHTML.js#L1319
I don't know if this is a known issue, I couldn't find it searching, so sorry if this is a duplicate.