fix: work around existing css that fail to draw mathjax (#32764)

This commit is contained in:
leangseu-edx
2023-07-17 13:43:17 -04:00
committed by GitHub
parent 4b64d8342d
commit df6c0fc69f
3 changed files with 22 additions and 1 deletions

View File

@@ -63,7 +63,14 @@ define(
t = -1;
}, delay);
}
};
// this is added to compensate for custom css that accidentally hide mathjax
$('.MathJax_SVG>svg').toArray().forEach(el => {
if ($(el).width() === 0) {
$(el).css('max-width', 'inherit');
}
});
};
}
);
window.CodeMirror = CodeMirror;

View File

@@ -115,6 +115,13 @@
t = -1;
}, delay);
}
// this is added to compensate for custom css that accidentally hide mathjax
$('.MathJax_SVG>svg').toArray().forEach(el => {
if ($(el).width() === 0) {
$(el).css('max-width', 'inherit');
}
});
};
</script>
<script type="text/x-mathjax-config">

View File

@@ -114,6 +114,13 @@
t = -1;
}, delay);
}
// this is added to compensate for custom css that accidentally hide mathjax
$('.MathJax_SVG>svg').toArray().forEach(el => {
if ($(el).width() === 0) {
$(el).css('max-width', 'inherit');
}
});
};
</script>