{"action":"created","comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/234527220","pull_request_review_id":176183587,"id":234527220,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDUyNzIyMA==","diff_hunk":"@@ -807,13 +807,15 @@ function gutenberg_register_scripts_and_styles() {\n \t);\n \twp_style_add_data( 'wp-components', 'rtl', 'replace' );\n \n-\tgutenberg_override_style(\n-\t\t'wp-block-library',\n-\t\tgutenberg_url( 'build/block-library/style.css' ),\n-\t\tcurrent_theme_supports( 'wp-block-styles' ) ? array( 'wp-block-library-theme' ) : array(),\n-\t\tfilemtime( gutenberg_dir_path() . 'build/block-library/style.css' )\n-\t);\n-\twp_style_add_data( 'wp-block-library', 'rtl', 'replace' );\n+\tif ( gutenberg_post_has_blocks( get_the_ID() ) ) {","path":"lib/client-assets.php","position":11,"original_position":11,"commit_id":"4f5f391a56612af092d40bc95c7bc1cc5dcff299","original_commit_id":"4f5f391a56612af092d40bc95c7bc1cc5dcff299","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},"body":"Loading these styles on the frontend is a conscious decision. There's no easy way to know that a page contains block or not especially since a page is not always about showing a specific page/post.\r\n\r\nIn Phase2 we plan to do some lazy-loading explorations to see if we can enqueue only the styles required by a given page. But even this is not a great approach because you'd end up with different stylesheets loaded for different posts which means the browser don't keep those in cache and will reload the styles on each page load.\r\n\r\nThe current option does add an extra stylesheet to load but at least this stylesheet don't change so it's only loaded once.\r\n\r\nIf you don't want this stylesheet to be loaded on your theme or installation, I suggest de-enqueuing it there https://codex.wordpress.org/Function_Reference/wp_dequeue_style","created_at":"2018-11-19T08:30:22Z","updated_at":"2018-11-19T08:30:23Z","html_url":"https://github.com/WordPress/gutenberg/pull/11510#discussion_r234527220","pull_request_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/234527220"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/11510#discussion_r234527220"},"pull_request":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510"}},"in_reply_to_id":233813733},"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510","id":228482860,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NDgyODYw","html_url":"https://github.com/WordPress/gutenberg/pull/11510","diff_url":"https://github.com/WordPress/gutenberg/pull/11510.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/11510.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/11510","number":11510,"state":"open","locked":false,"title":"Added condition for include wp-block-styles. ","user":{"login":"valko-pro","id":22908236,"node_id":"MDQ6VXNlcjIyOTA4MjM2","avatar_url":"https://avatars2.githubusercontent.com/u/22908236?v=4","gravatar_id":"","url":"https://api.github.com/users/valko-pro","html_url":"https://github.com/valko-pro","followers_url":"https://api.github.com/users/valko-pro/followers","following_url":"https://api.github.com/users/valko-pro/following{/other_user}","gists_url":"https://api.github.com/users/valko-pro/gists{/gist_id}","starred_url":"https://api.github.com/users/valko-pro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valko-pro/subscriptions","organizations_url":"https://api.github.com/users/valko-pro/orgs","repos_url":"https://api.github.com/users/valko-pro/repos","events_url":"https://api.github.com/users/valko-pro/events{/privacy}","received_events_url":"https://api.github.com/users/valko-pro/received_events","type":"User","site_admin":false},"body":"Include wp-block-styles only on pages that use Gutenberg. \r\n","created_at":"2018-11-05T20:35:18Z","updated_at":"2018-11-19T08:30:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a74c4b3cbe23f7ae85518285985a90d31e0f9b60","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1020812022,"node_id":"MDU6TGFiZWwxMDIwODEyMDIy","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Needs%20Technical%20Feedback","name":"Needs Technical Feedback","color":"67dff7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/11510/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/4f5f391a56612af092d40bc95c7bc1cc5dcff299","head":{"label":"valko-pro:add/condition-for-block-library-styles","ref":"add/condition-for-block-library-styles","sha":"4f5f391a56612af092d40bc95c7bc1cc5dcff299","user":{"login":"valko-pro","id":22908236,"node_id":"MDQ6VXNlcjIyOTA4MjM2","avatar_url":"https://avatars2.githubusercontent.com/u/22908236?v=4","gravatar_id":"","url":"https://api.github.com/users/valko-pro","html_url":"https://github.com/valko-pro","followers_url":"https://api.github.com/users/valko-pro/followers","following_url":"https://api.github.com/users/valko-pro/following{/other_user}","gists_url":"https://api.github.com/users/valko-pro/gists{/gist_id}","starred_url":"https://api.github.com/users/valko-pro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valko-pro/subscriptions","organizations_url":"https://api.github.com/users/valko-pro/orgs","repos_url":"https://api.github.com/users/valko-pro/repos","events_url":"https://api.github.com/users/valko-pro/events{/privacy}","received_events_url":"https://api.github.com/users/valko-pro/received_events","type":"User","site_admin":false},"repo":{"id":156268690,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyNjg2OTA=","name":"gutenberg","full_name":"valko-pro/gutenberg","private":false,"owner":{"login":"valko-pro","id":22908236,"node_id":"MDQ6VXNlcjIyOTA4MjM2","avatar_url":"https://avatars2.githubusercontent.com/u/22908236?v=4","gravatar_id":"","url":"https://api.github.com/users/valko-pro","html_url":"https://github.com/valko-pro","followers_url":"https://api.github.com/users/valko-pro/followers","following_url":"https://api.github.com/users/valko-pro/following{/other_user}","gists_url":"https://api.github.com/users/valko-pro/gists{/gist_id}","starred_url":"https://api.github.com/users/valko-pro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valko-pro/subscriptions","organizations_url":"https://api.github.com/users/valko-pro/orgs","repos_url":"https://api.github.com/users/valko-pro/repos","events_url":"https://api.github.com/users/valko-pro/events{/privacy}","received_events_url":"https://api.github.com/users/valko-pro/received_events","type":"User","site_admin":false},"html_url":"https://github.com/valko-pro/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Plugin is available from the official WordPress repository.","fork":true,"url":"https://api.github.com/repos/valko-pro/gutenberg","forks_url":"https://api.github.com/repos/valko-pro/gutenberg/forks","keys_url":"https://api.github.com/repos/valko-pro/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valko-pro/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valko-pro/gutenberg/teams","hooks_url":"https://api.github.com/repos/valko-pro/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/valko-pro/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/valko-pro/gutenberg/events","assignees_url":"https://api.github.com/repos/valko-pro/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/valko-pro/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/valko-pro/gutenberg/tags","blobs_url":"https://api.github.com/repos/valko-pro/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valko-pro/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valko-pro/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/valko-pro/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valko-pro/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/valko-pro/gutenberg/languages","stargazers_url":"https://api.github.com/repos/valko-pro/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/valko-pro/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/valko-pro/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/valko-pro/gutenberg/subscription","commits_url":"https://api.github.com/repos/valko-pro/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/valko-pro/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/valko-pro/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/valko-pro/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/valko-pro/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/valko-pro/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valko-pro/gutenberg/merges","archive_url":"https://api.github.com/repos/valko-pro/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valko-pro/gutenberg/downloads","issues_url":"https://api.github.com/repos/valko-pro/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/valko-pro/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/valko-pro/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/valko-pro/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valko-pro/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/valko-pro/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/valko-pro/gutenberg/deployments","created_at":"2018-11-05T19:08:27Z","updated_at":"2018-11-05T19:08:33Z","pushed_at":"2018-11-14T10:11:11Z","git_url":"git://github.com/valko-pro/gutenberg.git","ssh_url":"git@github.com:valko-pro/gutenberg.git","clone_url":"https://github.com/valko-pro/gutenberg.git","svn_url":"https://github.com/valko-pro/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":33291,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"dfc2b5ff3915bab793fff1410136eda1587e51ff","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","private":false,"owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-11-19T08:29:01Z","pushed_at":"2018-11-19T08:28:26Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":34529,"stargazers_count":3752,"watchers_count":3752,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1047,"mirror_url":null,"archived":false,"open_issues_count":1613,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1047,"open_issues":1613,"watchers":3752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/11510"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/11510"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/11510/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/11510/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/4f5f391a56612af092d40bc95c7bc1cc5dcff299"}},"author_association":"NONE"}}
{"actor":{"display_login":"youknowriad"}}