Jump to content

Write SVG Element Dimensions to file, How To

Recommended Posts

I hit a bug with IE9-11 browsers which need their svg backgrounds to have elements with explicit dimensions




<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svgwidth="1446px" height="1397px" viewBox="0 0 2600 1397"



rather than


<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svgwidth="100%" height="100%" viewBox="0 0 2600 1397"


which it currently produces.


Is there a way to do this currently, or could that be added in soon?


IT's a real headache to have to hand code a whole bunch of (multi breakpoint) output files, after every slice output   - eg on this project there's about 16 to do each time.




FYI  the source on the IE bug is at here on stackexchange.



one planet, one chance

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.