-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
At Khan Academy we sometimes use KaTeX strings inside of SVG images. But now that \sqrt{} and \vec{} are themselves rendered as SVGs we've discovered a problem. Our SVG images set fill-opacity to 0, so when we try to render \sqrt{2} inside of one of these images, the square root sign is fully transparent and does not show up at all.
I've discussed this with @kevinbarabash. We're thinking that we should add some kind of svg-reset class name to the toplevel HTML element that we output. And then define this class to reset SVG css properties (like fill-opacity and stroke-width) to their default values.
The idea is that we don't want SVG glyphs to be distinguishable from glyphs actually rendered by a real font, so we shouldn't allow anything in the CSS environment to affect SVG glyphs if it would not also affect font glyphs. So presumably we should inherit the CSS color property, but not the SVG-specific CSS stroke property.