{"action":"created","issue":{"url":"https://api.github.com/repos/svg/svgo/issues/1033","repository_url":"https://api.github.com/repos/svg/svgo","labels_url":"https://api.github.com/repos/svg/svgo/issues/1033/labels{/name}","comments_url":"https://api.github.com/repos/svg/svgo/issues/1033/comments","events_url":"https://api.github.com/repos/svg/svgo/issues/1033/events","html_url":"https://github.com/svg/svgo/issues/1033","id":360834395,"node_id":"MDU6SXNzdWUzNjA4MzQzOTU=","number":1033,"title":"Usefull  class names are removed","user":{"login":"sorenpa","id":3624088,"node_id":"MDQ6VXNlcjM2MjQwODg=","avatar_url":"https://avatars1.githubusercontent.com/u/3624088?v=4","gravatar_id":"","url":"https://api.github.com/users/sorenpa","html_url":"https://github.com/sorenpa","followers_url":"https://api.github.com/users/sorenpa/followers","following_url":"https://api.github.com/users/sorenpa/following{/other_user}","gists_url":"https://api.github.com/users/sorenpa/gists{/gist_id}","starred_url":"https://api.github.com/users/sorenpa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorenpa/subscriptions","organizations_url":"https://api.github.com/users/sorenpa/orgs","repos_url":"https://api.github.com/users/sorenpa/repos","events_url":"https://api.github.com/users/sorenpa/events{/privacy}","received_events_url":"https://api.github.com/users/sorenpa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-17T11:56:08Z","updated_at":"2018-09-17T14:20:12Z","closed_at":null,"author_association":"NONE","body":"When I run SVGO on the following file:\r\n\r\n```\r\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 12\">\r\n  <defs>\r\n    <style>\r\n      .cls-1 {\r\n        fill: #98bdbf;\r\n      }\r\n      .cls-2 {\r\n        fill: none;\r\n        stroke: #fff;\r\n      }\r\n    </style>\r\n  </defs>\r\n  <g id=\"Group_2351\" data-name=\"Group 2351\" transform=\"translate(-12003 -12714)\">\r\n    <path id=\"Path_9439\" data-name=\"Path 9439\" class=\"cls-1\" d=\"M6,0A6,6,0,1,1,0,6,6,6,0,0,1,6,0Z\" transform=\"translate(12015 12726) rotate(180)\"/>\r\n    <line id=\"Line_1232\" data-name=\"Line 1232\" class=\"cls-2\" y1=\"7\" x2=\"9\" transform=\"translate(12004.5 12716.5)\"/>\r\n  </g>\r\n</svg>\r\n```\r\n\r\nThe svg file looks like this:\r\n![classnames2](https://user-images.githubusercontent.com/3624088/45621594-2a6af400-ba81-11e8-9c69-1b9996777a99.png)\r\n\r\n\r\nit gets optimized into:\r\n\r\n```\r\n<svg><g data-name=\"Group 2351\"><path d=\"M6 12a6 6 0 1 1 6-6 6 6 0 0 1-6 6z\" data-name=\"Path 9439\"/><path d=\"M1.5 9.5l9-7\" data-name=\"Line 1232\"/></g></svg>\r\n```\r\n\r\nI cannot style the optimized SVG to look like the original, since the class names cls-1 and cls-2 are missing. I can set fill to the bluish-grey and stroke to white, and I will get something close, but the stroke will create a white outline around the circle. Is there any way to preserve the class names ?\r\n\r\nmy current config is as follows:\r\n\r\n```\r\nconst config = {\r\n    plugins: [\r\n      {\r\n        cleanupAttrs: true,\r\n      },\r\n      {\r\n        removeStyleElement:true,\r\n      },\r\n      {\r\n        removeDoctype: true,\r\n      },\r\n      {\r\n        removeXMLProcInst: true,\r\n      },\r\n      {\r\n        removeXMLNS: true,\r\n      },\r\n      {\r\n        removeComments: true,\r\n      },\r\n      {\r\n        removeMetadata: true,\r\n      },\r\n      {\r\n        removeTitle: true,\r\n      },\r\n      {\r\n        removeDesc: true,\r\n      },\r\n      {\r\n        removeUselessDefs: true,\r\n      },\r\n      {\r\n        removeEditorsNSData: true,\r\n      },\r\n      {\r\n        removeEmptyAttrs: true,\r\n      },\r\n      {\r\n        removeHiddenElems: true,\r\n      },\r\n      {\r\n        removeEmptyText: true,\r\n      },\r\n      {\r\n        removeEmptyContainers: true,\r\n      },\r\n      {\r\n        removeViewBox: false,\r\n      },\r\n      {\r\n        cleanupEnableBackground: true,\r\n      },\r\n      {\r\n        convertStyleToAttrs: true,\r\n      },\r\n      {\r\n        convertColors: true,\r\n      },\r\n      {\r\n        convertPathData: true,\r\n      },\r\n      {\r\n        convertTransform: true,\r\n      },\r\n      {\r\n        removeUnknownsAndDefaults: true,\r\n      },\r\n      {\r\n        removeNonInheritableGroupAttrs: true,\r\n      },\r\n      {\r\n        removeUselessStrokeAndFill: true,\r\n      },\r\n      {\r\n        removeUnusedNS: true,\r\n      },\r\n      {\r\n        cleanupIDs: true,\r\n      },\r\n      {\r\n        cleanupNumericValues: true,\r\n      },\r\n      {\r\n        moveElemsAttrsToGroup: true,\r\n      },\r\n      {\r\n        moveGroupAttrsToElems: true,\r\n      },\r\n      {\r\n        collapseGroups: true,\r\n      },\r\n      {\r\n        removeRasterImages: true,\r\n      },\r\n      {\r\n        mergePaths: true,\r\n      },\r\n      {\r\n        convertShapeToPath: true,\r\n      },\r\n      {\r\n        sortAttrs: true,\r\n      },\r\n      {\r\n        removeDimensions: true,\r\n      },\r\n      {\r\n        removeAttrs: {attrs: '(stroke|fill)'},\r\n      }\r\n    ]\r\n}\r\n\r\nmodule.exports = {\r\n  config\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/svg/svgo/issues/comments/422036118","html_url":"https://github.com/svg/svgo/issues/1033#issuecomment-422036118","issue_url":"https://api.github.com/repos/svg/svgo/issues/1033","id":422036118,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjAzNjExOA==","user":{"login":"GreLI","id":1467392,"node_id":"MDQ6VXNlcjE0NjczOTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1467392?v=4","gravatar_id":"","url":"https://api.github.com/users/GreLI","html_url":"https://github.com/GreLI","followers_url":"https://api.github.com/users/GreLI/followers","following_url":"https://api.github.com/users/GreLI/following{/other_user}","gists_url":"https://api.github.com/users/GreLI/gists{/gist_id}","starred_url":"https://api.github.com/users/GreLI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreLI/subscriptions","organizations_url":"https://api.github.com/users/GreLI/orgs","repos_url":"https://api.github.com/users/GreLI/repos","events_url":"https://api.github.com/users/GreLI/events{/privacy}","received_events_url":"https://api.github.com/users/GreLI/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T14:20:12Z","updated_at":"2018-09-17T14:20:12Z","author_association":"MEMBER","body":"SVGO doesn't really works well with styles. You should try `inlineStyles` plugin."}}
{"actor":{"display_login":"GreLI"}}