Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG output width and height for HTML output #71

Closed
ndee02 opened this issue Jan 11, 2023 · 2 comments
Closed

SVG output width and height for HTML output #71

ndee02 opened this issue Jan 11, 2023 · 2 comments

Comments

@ndee02
Copy link
Contributor

ndee02 commented Jan 11, 2023

Currently, the :width: and :height: properties are ignored for SVG outputs. This is a bit annoying, as for PNG, the output image is properly resized if you specify those properties. In addition, SVG offers much better options to define the display size (as the name suggests, it is a scalable vector graphic): percentages for width are a feasible option.

I had a look at the code, and for SVG, it currently just copies the calculated width and height in pixels from the SVG and puts it to the <object> tag.
I suggest to substitute width and height with the properties given to the directive instead. :width: 100% would work nicely for SVGs and HTML output.
An additional consideration would be to add also a :max-width: property.

It seems it would at least partially address other user's findings:

@yuja
Copy link
Collaborator

yuja commented Jan 11, 2023

Makes sense. Apparently, this is just not implemented yet after 210a47f and 64a571f.

@ndee02
Copy link
Contributor Author

ndee02 commented Mar 2, 2023

resolved in #72

@ndee02 ndee02 closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants