{"action":"opened","issue":{"url":"https://api.github.com/repos/jonkemp/style-data/issues/5","repository_url":"https://api.github.com/repos/jonkemp/style-data","labels_url":"https://api.github.com/repos/jonkemp/style-data/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/jonkemp/style-data/issues/5/comments","events_url":"https://api.github.com/repos/jonkemp/style-data/issues/5/events","html_url":"https://github.com/jonkemp/style-data/issues/5","id":307599838,"number":5,"title":"Excluding some style tags from inlining","user":{"login":"Mefu","id":3254190,"avatar_url":"https://avatars2.githubusercontent.com/u/3254190?v=4","gravatar_id":"","url":"https://api.github.com/users/Mefu","html_url":"https://github.com/Mefu","followers_url":"https://api.github.com/users/Mefu/followers","following_url":"https://api.github.com/users/Mefu/following{/other_user}","gists_url":"https://api.github.com/users/Mefu/gists{/gist_id}","starred_url":"https://api.github.com/users/Mefu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mefu/subscriptions","organizations_url":"https://api.github.com/users/Mefu/orgs","repos_url":"https://api.github.com/users/Mefu/repos","events_url":"https://api.github.com/users/Mefu/events{/privacy}","received_events_url":"https://api.github.com/users/Mefu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-22T11:12:36Z","updated_at":"2018-03-22T11:12:36Z","closed_at":null,"author_association":"NONE","body":"For the issue jonkemp/inline-css#56. Following addition to index.js works well enough in my project. I should admit I do not grasp how whole inlining process works, so this might not be the best place or best way to do it. \r\n\r\n```javascript\r\n    ...\r\n    $('style').each(function (index, element) {\r\n        var mediaQueries;\r\n        // exclude style tags with data-no-inline attribute set to true\r\n        if($(element).data(\"no-inline\") === true) {\r\n            return;\r\n        }\r\n        styleDataList = element.childNodes;\r\n        if (styleDataList.length !== 1) {\r\n            callback(new Error('empty style element'));\r\n            return;\r\n        }\r\n        styleData = styleDataList[0].data;\r\n        if (options.applyStyleTags) {\r\n            results.css.push(styleData);\r\n        }\r\n        if (options.removeStyleTags) {\r\n            if (options.preserveMediaQueries) {\r\n                mediaQueries = mediaQueryText(element.childNodes[0].nodeValue);\r\n                element.childNodes[0].nodeValue = mediaQueries;\r\n            }\r\n            if (!mediaQueries) {\r\n                $(element).remove();\r\n            }\r\n        }\r\n    });\r\n    ...\r\n```\r\nShould I create a pull request for this? If I should, I have few questions. Should I change name of the attribute (`data-no-inline`) ? Also which one of the following is better?\r\n```html\r\n<style type=\"text/css\" data-no-inline=\"true\">\r\n  ...\r\n</style>\r\n```\r\nor\r\n```html\r\n<style type=\"text/css\" data-no-inline>\r\n  ...\r\n</style>\r\n```\r\n"}}
{"actor":{"display_login":"Mefu"}}