You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When targeting the svg output, the file is embedded using the html <object>
tag. While this displays correctly on chromium, firefox does not apply the
transparency correctly to the object (see the undesired white background in the image below):
I suggest using an img tag instead of the object tag as listed below, as
this will display the svg correctly in firefox:
One caveat for this approach is that this might impact the behaviour for
animated/interactive svg files (if that is even a concern for the svg target of mmdc).
The text was updated successfully, but these errors were encountered:
tsibley
added a commit
to tsibley/sphinxcontrib-mermaid
that referenced
this issue
Nov 9, 2023
<img>, unlike <object>, has proper alt text support (i.e. that's not
just fallback content) and is easily saved, opened in a new tab, etc.
from the page where it appears.
This does mean the SVG's DOM will no longer be available for inspection
by JavaScript in the containing document (e.g. object.contentDocument),
but I don't think that was intended to be a feature of SVG output for
this Sphinx extension.
Resolves <mgaitan#102>
as well.
tsibley
added a commit
to tsibley/sphinxcontrib-mermaid
that referenced
this issue
Nov 9, 2023
<img>, unlike <object>, has proper alt text support (i.e. that's not
just fallback content) and is easily saved, opened in a new tab, etc.
from the page where it appears.
This does mean the SVG's DOM will no longer be available for inspection
by JavaScript in the containing document (e.g. object.contentDocument),
but I don't think that was intended to be a feature of SVG output for
this Sphinx extension.
Resolves <mgaitan#102>
as well.
When targeting the
svg
output, the file is embedded using the html<object>
tag. While this displays correctly on chromium, firefox does not apply the
transparency correctly to the object (see the undesired white background in the image below):
I suggest using an
img
tag instead of theobject
tag as listed below, asthis will display the
svg
correctly in firefox:One caveat for this approach is that this might impact the behaviour for
animated/interactive
svg
files (if that is even a concern for thesvg
target ofmmdc
).The text was updated successfully, but these errors were encountered: