diff --git a/src/scss/common/questions.scss b/src/scss/common/questions.scss index ad8ab1b247..45111a3d6a 100644 --- a/src/scss/common/questions.scss +++ b/src/scss/common/questions.scss @@ -508,6 +508,13 @@ $inline-feedback-padding: 2px; display: inline; } +.katex-display.katex-display { + // katex default is margin: 1rem 0, padding: 0. owing to issues with requiring hidden y-overflow, we move some of this + // to padding to "absorb" the overflow and prevent it from being cut off (helps fix latex dropzones in big latex expressions - c.f. matrices) + margin: 0.5rem 0; + padding: 0.5rem 0; +} + // cloze dropdowns inside katex are normally cut off due to content-driven overflows we cannot control easily. this: // a) enforces that dropdowns are provided $cloze-dropdown-height of space (maximum height before scrolling); // b) sets the correct overflow behaviour for the parent of the katex containing the dropdown; diff --git a/src/test/pages/__image_snapshots__/ada/Question types' regression test page should have no visual regressions #0.png b/src/test/pages/__image_snapshots__/ada/Question types' regression test page should have no visual regressions #0.png index a81d0f1e56..42f8fc55dc 100644 Binary files a/src/test/pages/__image_snapshots__/ada/Question types' regression test page should have no visual regressions #0.png and b/src/test/pages/__image_snapshots__/ada/Question types' regression test page should have no visual regressions #0.png differ diff --git a/src/test/pages/__image_snapshots__/phy/Question types' regression test page should have no visual regressions #0.png b/src/test/pages/__image_snapshots__/phy/Question types' regression test page should have no visual regressions #0.png index f86ba311a2..837f3774b7 100644 Binary files a/src/test/pages/__image_snapshots__/phy/Question types' regression test page should have no visual regressions #0.png and b/src/test/pages/__image_snapshots__/phy/Question types' regression test page should have no visual regressions #0.png differ