{"action":"created","issue":{"url":"https://api.github.com/repos/jonkemp/inline-css/issues/40","repository_url":"https://api.github.com/repos/jonkemp/inline-css","labels_url":"https://api.github.com/repos/jonkemp/inline-css/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/jonkemp/inline-css/issues/40/comments","events_url":"https://api.github.com/repos/jonkemp/inline-css/issues/40/events","html_url":"https://github.com/jonkemp/inline-css/pull/40","id":153025275,"number":40,"title":"Feature/map attributes","user":{"login":"Daylon","id":2176762,"avatar_url":"https://avatars.githubusercontent.com/u/2176762?v=3","gravatar_id":"","url":"https://api.github.com/users/Daylon","html_url":"https://github.com/Daylon","followers_url":"https://api.github.com/users/Daylon/followers","following_url":"https://api.github.com/users/Daylon/following{/other_user}","gists_url":"https://api.github.com/users/Daylon/gists{/gist_id}","starred_url":"https://api.github.com/users/Daylon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daylon/subscriptions","organizations_url":"https://api.github.com/users/Daylon/orgs","repos_url":"https://api.github.com/users/Daylon/repos","events_url":"https://api.github.com/users/Daylon/events{/privacy}","received_events_url":"https://api.github.com/users/Daylon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-04T14:26:16Z","updated_at":"2016-05-05T08:19:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jonkemp/inline-css/pulls/40","html_url":"https://github.com/jonkemp/inline-css/pull/40","diff_url":"https://github.com/jonkemp/inline-css/pull/40.diff","patch_url":"https://github.com/jonkemp/inline-css/pull/40.patch"},"body":"Following up [issue #8](https://github.com/jonkemp/inline-css/issues/8) this PR proposes to add further rule-to-attribute capability by letting the user to add custom maps to any HTML element.\r\n\r\nUse case: dedicated email markups à la [MJML](https://github.com/mjmlio/mjml) try to remove some complexity to improve semantics readability; they're doing so by using custom HTML element which, once compiled, are converted to one or more nested elements optimized to be Email HTML compliant. However, such engines tend to force-remove style attributes.\r\n\r\nInline-CSS may help keep existing pipelines clean (Gulp, etc.) by using its capabilities to keep custom style rules separated from markup, only applying properly declared attribute maps; especially since the said markup may combine both regular HTML.classname and custom markup —MJML, etc.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nvar options = {\r\n            removeStyleTags: true,\r\n            applyAttributesTo: {\r\n              'mj-section': [\r\n                'full-width',\r\n                'text-align',\r\n                'background-color'\r\n              ],\r\n              'mj-section,mj-text': [\r\n                'padding'\r\n              ]\r\n            }\r\n        };\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jonkemp/inline-css/issues/comments/217101021","html_url":"https://github.com/jonkemp/inline-css/pull/40#issuecomment-217101021","issue_url":"https://api.github.com/repos/jonkemp/inline-css/issues/40","id":217101021,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T08:19:02Z","updated_at":"2016-05-05T08:19:02Z","body":"\n[![Coverage Status](https://coveralls.io/builds/6058720/badge)](https://coveralls.io/builds/6058720)\n\nCoverage increased (+0.06%) to 98.571% when pulling **dd962bf1ed4a2a902bc750d7d31e3b738109b7b7 on Daylon:feature/map-attributes** into **be4cbf96b287065c2d1c921a3ae4867adb0297b9 on jonkemp:master**.\n"}}