{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/9008","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/9008/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/9008/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/9008/events","html_url":"https://github.com/WordPress/gutenberg/pull/9008","id":350735351,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTA3ODUz","number":9008,"title":"Styles: auto-wrap theme provided styles to avoid specifity in the theme stylesheets","user":{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"labels":[{"id":587918873,"node_id":"MDU6TGFiZWw1ODc5MTg4NzM=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Customization","name":"Customization","color":"655104","default":false},{"id":631490822,"node_id":"MDU6TGFiZWw2MzE0OTA4MjI=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Extensibility","name":"Extensibility","color":"655104","default":false},{"id":531680824,"node_id":"MDU6TGFiZWw1MzE2ODA4MjQ=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Task","name":"[Type] Task","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"assignees":[{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-08-15T08:57:34Z","updated_at":"2018-08-22T10:16:56Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/9008","html_url":"https://github.com/WordPress/gutenberg/pull/9008","diff_url":"https://github.com/WordPress/gutenberg/pull/9008.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/9008.patch"},"body":"Extending the editor styles is not an easy task for theme developers. They have to take care of all the specifity that Gutenberg styles use. And it's prone to errors because Gutenberg can change the wrappers at any time.\r\n\r\nIn this PR I'm exploring auto-injecting namespaces (specifity) for theme CSS to avoid leaving that to the theme developpers.\r\n\r\nA theme author would write:\r\n\r\n```css\r\nh2 { color: red; }\r\n```\r\n\r\nThe injected CSS would be\r\n\r\n```css\r\n.editor-block-list__block h2 { color: red; }\r\n```\r\n\r\nTo test it, notice that the editor styles do work for the Twenty Seventeen theme."},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/414984210","html_url":"https://github.com/WordPress/gutenberg/pull/9008#issuecomment-414984210","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/9008","id":414984210,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDk4NDIxMA==","user":{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T10:16:56Z","updated_at":"2018-08-22T10:16:56Z","author_association":"CONTRIBUTOR","body":"The reason I chose `postscss-prefixwrap` is because it handles `body` properly. It does exactly that https://github.com/WordPress/gutenberg/pull/9008#issuecomment-413154301 \r\n\r\nAnd the bundle size increase is not because of `postscss-prefixwrap` but it's because of `postcss` which itself also works on ASTs. The other drawbacks of namespacing are acceptable IMO.\r\n\r\nAlso, namespacing is not the only thing we need here, we also need to rewrite the URLs because we're not including the stylesheet by URL, we're reading it and including it in any random webpage, so we need to use absolute URLs. "}}
{"actor":{"display_login":"youknowriad"}}