Page MenuHomePhabricator

chem equations cut off
Closed, DuplicatePublic


When rendering <chem>C2H5OH{} + C2H5OH ->[\ce{cc.\ H2SO4}] C2H5-O-C2H5{} + H2O</chem> in Chrome Version 70.0.3538.77(64) it gets cut off at the top (see below)

cch2so4.png (167×907 px, 15 KB)

Bug reported here:

Event Timeline

I can reproduce it using Chromium 69.0.3497.92 on Debian Stretch, logged out (so that the default setting of SVG image applies).

Firefox renders fine for me and the image itself is ok. If you manually hack the DOM and increase the surrounding font size (e.g. to 1.5em), Chrome also looks ok, so this seems to be a browser bug. Not that it makes it any better.

If you replace the img tag with the svg content itself, the rendering is also fine on Chrome (no font size change necessary), so this would be yet another argument to switch to inline svgs.

A correction: Firefox seems to be the outlier here. Chrome, WebKit and IE/Edge all crop the img as in the screenshot but work fine if the SVG is inlined.

This could be a CSS (including user agent stylesheet) interference but I can't find a unified reason.

[edited: sorry, this was the wrong issue]

Usually tasks are merging into the older one

Usually tasks are merging into the older one

My apologies and thank you for telling me. I'll merge into the older one going forward.