ChronixSC Posted October 20, 2017 Share Posted October 20, 2017 When exporting to SVG, is it possible to get HTML5 output without putting every property into styles? Example: <?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"> <svg width="100%" height="100%" viewBox="0 0 300 57" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <rect x="78.614" y="8.716" width="220.68" height="14" style="fill:#e0e0e0;"/> <ellipse cx="28.992" cy="28.132" rx="24.492" ry="23.632" style="fill:none;stroke:#e0e0e0;stroke-width:9px;"/> </svg> According to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute#Core_attributes this can be written like this (looking only at the rect and ellipse): <?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"> <svg width="100%" height="100%" viewBox="0 0 300 57" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <rect x="78.614" y="8.716" width="220.68" height="14" fill="#e0e0e0"/> <ellipse cx="28.992" cy="28.132" rx="24.492" ry="23.632" fill="none" stroke="#e0e0e0" stroke-width="9px" /> </svg> In my opinion this a more modern and cleaner way of writing SVG. Quote Link to comment Share on other sites More sharing options...
JFisher Posted October 25, 2017 Share Posted October 25, 2017 Hi ChronixSC Welcome to the forum. This is something that has been requested before but isn't possible at the moment i'm afraid. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.