marp-core
marp-core copied to clipboard
Safari does not shrink down protruding KaTeX math block
In Safari, very long math block won't shrink down by auto-scaling in Marp Core.
<style>
svg { outline: 3px solid red; }
</style>
$$
f(x)=a+b+c+d+e+f+g+h+i+j+k+l
$$
$$
f(x)=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s
$$
$$
f(x)=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z
$$
| Safari | Chrome | Firefox |
|---|---|---|
![]() |
![]() |
![]() |
As indicated by outlines for <svg>, DOM layout for auto-scaling don't protrude. Simply Safari's long-stucked bug over 11 years has affected to nested <foreignObject> rendering.
Curiously fitting header and code block won't protrude even in Safari. I suppose rendering of the complex contents may not be working.
It seems to be fixed in MathJax math block (implemented in v1.2.0). We can close this in the near future, if MathJax rendering would be a primary option.



