🐛 Bug Report: Removed dominant-baseline
on svg text
for inline SVG causing text misalignment
#28006
Open
2 tasks done
Labels
📜 Description
Hi,
We have issue when rendering inline svg with techdocs. It doesn't hapen when using mkdocs material and is specific how backstage is rendering techdocs.
This happen both on backstage and
techdocs-cli serve --no-docker --verbose
I've created a minimal reproduction repo with screenshots/example here: https://github.com/jonesbusy/mkdocs-backstage-tests/blob/main/docs/index.md but I will also post there
For some reason I cannot explain, inline
svg
on techdocs have their text attributedominant-baseline="text-before-edge"
dropped causing text misalignementAn example svg
That look like this
Is rendered correctly on mkdocs
But techdoc, the text is not alligned
When trying to investigate, we check at the HTML and realize that the svg is removed attributes like
dominant-baseline="text-before-edge
This example is with a very simple svg, but it also happen when SVG are generated by kroki and put inline on the HTML page
See here
The result is missing the attribute
When we edit the HTML and "restore" manually this attribute it works fine
Why on techdocs such attributes are removed ? Is there any optimization done at rendering ?
Note: This only happen at rendering. When
techdocs-cli generate --no-docker --verbose
the attributes are keptsThanks
👍 Expected behavior
Same as mkdocs. See before
👎 Actual Behavior with Screenshots
See before
👟 Reproduction steps
Repo here https://github.com/jonesbusy/mkdocs-backstage-tests
With instruction/example also on the docs folder
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
No response
👀 Have you spent some time to check if this bug has been raised before?
🏢 Have you read the Code of Conduct?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: