/* HACK(benchristel): these CSS rules are needed to get \text{} to render
 * nicely on Safari. See this issue:
 * https://github.com/mathjax/MathJax/issues/2866
 * The :not(mjx-base) selectors prevent this rule from applying to characters
 * that have accents or other modifiers (like vector arrows or hats) placed
 * over them.
 */
:not(mjx-base) > :not(mjx-base) > :where(mjx-mn, mjx-mtext, mjx-mi:not(.mjx-i), mjx-utext) > mjx-c::before {
    padding-top: 0.8em !important;
}
/* MathJax inserts extra space under the bar of square roots. This is a visual
 * difference from KaTeX, and looks bad when combined with the padding hack
 * above. So we remove the extra space. The ::before pseudo-element with
 * min-height ensures that the square root is always at least tall enough to
 * accommodate one line of text.
 */
mjx-sqrt > mjx-box {
    padding-top: 0 !important;
}
mjx-sqrt > mjx-box > :first-child::before {
    min-height: 0.8em;
    width: 0;
    display: inline-block;
    content: '';
}
/* The fix for square roots results in another problem: if the square root
 * contains a display-style fraction with only a variable in the numerator, not
 * enough space is left between the square root bar and the numerator. To fix
 * this, we make sure that fraction numerators are always at least the height
 * of a full line of text.
 */
mjx-frac[type=d] > mjx-num::before {
    min-height: 0.8em;
    width: 0;
    display: inline-block;
    content: '';
}

