{"action":"created","issue":{"url":"https://api.github.com/repos/svg/svgo/issues/273","repository_url":"https://api.github.com/repos/svg/svgo","labels_url":"https://api.github.com/repos/svg/svgo/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/svg/svgo/issues/273/comments","events_url":"https://api.github.com/repos/svg/svgo/issues/273/events","html_url":"https://github.com/svg/svgo/issues/273","id":48975582,"number":273,"title":"Allow to set or override \"preserveAspectRatio\" attribute","user":{"login":"mahnunchik","id":780935,"avatar_url":"https://avatars.githubusercontent.com/u/780935?v=3","gravatar_id":"","url":"https://api.github.com/users/mahnunchik","html_url":"https://github.com/mahnunchik","followers_url":"https://api.github.com/users/mahnunchik/followers","following_url":"https://api.github.com/users/mahnunchik/following{/other_user}","gists_url":"https://api.github.com/users/mahnunchik/gists{/gist_id}","starred_url":"https://api.github.com/users/mahnunchik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahnunchik/subscriptions","organizations_url":"https://api.github.com/users/mahnunchik/orgs","repos_url":"https://api.github.com/users/mahnunchik/repos","events_url":"https://api.github.com/users/mahnunchik/events{/privacy}","received_events_url":"https://api.github.com/users/mahnunchik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2014-11-16T11:34:04Z","updated_at":"2016-09-08T09:06:22Z","closed_at":"2014-11-16T12:11:42Z","body":"It can be useful for normalizing svg files or for fixing this bug https://stackoverflow.com/questions/26263550/css-svg-background-strange-transparent-line-around"},"comment":{"url":"https://api.github.com/repos/svg/svgo/issues/comments/245538114","html_url":"https://github.com/svg/svgo/issues/273#issuecomment-245538114","issue_url":"https://api.github.com/repos/svg/svgo/issues/273","id":245538114,"user":{"login":"DonGissel","id":2520296,"avatar_url":"https://avatars.githubusercontent.com/u/2520296?v=3","gravatar_id":"","url":"https://api.github.com/users/DonGissel","html_url":"https://github.com/DonGissel","followers_url":"https://api.github.com/users/DonGissel/followers","following_url":"https://api.github.com/users/DonGissel/following{/other_user}","gists_url":"https://api.github.com/users/DonGissel/gists{/gist_id}","starred_url":"https://api.github.com/users/DonGissel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonGissel/subscriptions","organizations_url":"https://api.github.com/users/DonGissel/orgs","repos_url":"https://api.github.com/users/DonGissel/repos","events_url":"https://api.github.com/users/DonGissel/events{/privacy}","received_events_url":"https://api.github.com/users/DonGissel/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T09:06:22Z","updated_at":"2016-09-08T09:06:22Z","body":"It's not just for that. preserveAspectRatio can be used to align the SVG content, regardless of how wide the outer canvas is. Let's say I have an SVG with content that's 64x64 pixels, but the outer element (in this case the <svg> containing the <use>) is 100px wide. I can then use preserveAspectRatio to align the SVG content top left, so I can resize the outer element (using CSS) without worring about flow. Right now, the content is centered no matter what I do, and this is not really great for my current use-case.\r\n\r\nIt's not just an editor-thing, because SVGO strips the tag off the incoming SVG-files, and there's currently no way to add them again (also, addAttributesToSVGElement doesn't seem to let me add values, and even if it did, I'd want to control this on a per-SVG basis instead of adding a blanket-statement, which would be a lot easier in the source file than in the setup for SVGO); nor is there a way to control this with styling from a browser. So I would say this is a needed feature."}}
{"actor":{"display_login":"DonGissel"}}