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

SVGs have their width and height set rendering them unresponsive #140

Open
lasseeee opened this issue Dec 3, 2022 · 1 comment
Open

Comments

@lasseeee
Copy link

lasseeee commented Dec 3, 2022

TL;DR: Setting the width and height constraints directly on a vector image defeats the purpose of being an svg in responsive webdesign.

The SVGs being created have their height and width set, rendering them unable to be natively responsive in browsers. I tried setting height and width to null but to no avail. Would it be a solution to remove the width and height from the generated SVG from ->toSvg() to make them work as SVGs were intended? If constraints are needed it's never a problem to create a container for the SVG, but removing the constraints from the SVG is impossible. I'd be happy to pull request the removal of the two attributes if this is at all an interesting change.

image

@uyab
Copy link
Contributor

uyab commented Dec 3, 2022

Yeah, I agree width and height attributes should be ignored (not rendered) if the value is null. PR are welcome 👨🏼‍💻

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