#64099 closed enhancement (fixed)
Load block styles on demand in classic themes via template enhancement output buffer
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Script Loader | Keywords: | has-patch has-unit-tests has-dev-note |
| Focuses: | performance | Cc: |
Description (last modified by )
This is intended to be a fast-follow after the introduction of the template enhancement output buffer in #43258.
In classic themes, a lot more CSS is added to a page than is needed because wp_head() is called the rest of the page is rendered, so it is not yet known in the HEAD what blocks will be used. This is in contrast with block themes, which render the content first and then wp_head() is called due to the way that template-canvas.php is constructed. This can be fixed with output buffering, which essentially makes the same block theme approach available to classic themes.
Instead of printing the styles at wp_head, a placeholder comment can be printed instead. Then at wp_footer, the output of print_late_styles() can be captured. The output of print_late_styles() can then replace the previously-output placeholder comment.
See performance impacts in these PR comments:
- Improved CSS coverage
- Web vitals benchmarks for Twenty Twenty on broadband, Fast 4G, and Slow 3G connections
- Web vitals benchmarks for all classic themes on a broadband connection (average LCP improvement: -14.94%)
- Impact on Lighthouse performance core for all classic themes (average improvement to score: +7.74%)
Attachments (4)
Change History (53)
This ticket was mentioned in Slack in #core by westonruter. View the logs.
7 weeks ago
This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.
7 weeks ago
This ticket was mentioned in PR #10288 on WordPress/wordpress-develop by @sjapaget.
7 weeks ago
#6
- Keywords has-patch added
Use output buffering for template enhancement to reduce unecessarily loaded CSS in classic themes. Makes use of wp_should_output_buffer_template_for_enhancement filter to delay the output of CSS until after the content is known and can be output by capturing the output of print_late_styles().
Trac ticket: https://core.trac.wordpress.org/ticket/64099
@westonruter commented on PR #10288:
7 weeks ago
#8
We also need to add unit tests.
@westonruter commented on PR #10288:
7 weeks ago
#9
@sjapaget Do you anticipate being able to continue working on this before next week? The beta1 release is on Tuesday, so this needs to be completed quickly. If you don't have availability, I'll follow up with additional commits to get it to the finish line.
@sjapaget commented on PR #10288:
7 weeks ago
#10
@sjapaget Do you anticipate being able to continue working on this before next week? The beta1 release is on Tuesday, so this needs to be completed quickly. If you don't have availability, I'll follow up with additional commits to get it to the finish line.
I've done a bit more to it this afternoon (just pushed up) and will have time tomorrow too, but I'd very much appreciate some pointers on how to approach testing this properly if possible?
@westonruter commented on PR #10288:
7 weeks ago
#12
Here's a diff in Twenty Twenty-One before and after, when where the styles_inline_size_limit is also set to zero to reduce the diff size:
-
.html
old new 47 47 <link 48 48 rel="stylesheet" 49 49 id="wp-block-library-css" 50 href="http://localhost:8000/wp-includes/css/dist/block-library/ style.min.css?ver=6.9-alpha-60093-src"50 href="http://localhost:8000/wp-includes/css/dist/block-library/common.min.css?ver=6.9-alpha-60093-src" 51 51 media="all" 52 52 /> 53 53 <link 54 54 rel="stylesheet" 55 id="wp-block-library-theme-css"56 href="http://localhost:8000/wp-includes/css/dist/block-library/theme.min.css?ver=6.9-alpha-60093-src"57 media="all"58 />59 <link60 rel="stylesheet"61 55 id="classic-theme-styles-css" 62 56 href="http://localhost:8000/wp-includes/css/classic-themes.min.css?ver=6.9-alpha-60093-src" 63 57 media="all" … … 84 78 } 85 79 /*# sourceURL=twenty-twenty-one-custom-color-overrides-inline-css */ 86 80 </style> 81 <link 82 rel="stylesheet" 83 id="twenty-twenty-one-style-css" 84 href="http://localhost:8000/wp-content/themes/twentytwentyone/style.css?ver=2.6" 85 media="all" 86 /> 87 <link 88 rel="stylesheet" 89 id="twenty-twenty-one-print-style-css" 90 href="http://localhost:8000/wp-content/themes/twentytwentyone/assets/css/print.css?ver=2.6" 91 media="print" 92 /> 93 <link 94 rel="stylesheet" 95 id="tt1-dark-mode-css" 96 href="http://localhost:8000/wp-content/themes/twentytwentyone/assets/css/style-dark-mode.css?ver=2.6" 97 media="all" 98 /> 99 <link 100 rel="stylesheet" 101 id="wp-block-image-css" 102 href="http://localhost:8000/wp-includes/blocks/image/style.min.css?ver=6.9-alpha-60093-src" 103 media="all" 104 /> 105 <link 106 rel="stylesheet" 107 id="wp-block-image-theme-css" 108 href="http://localhost:8000/wp-includes/blocks/image/theme.min.css?ver=6.9-alpha-60093-src" 109 media="all" 110 /> 111 <link 112 rel="stylesheet" 113 id="wp-block-paragraph-css" 114 href="http://localhost:8000/wp-includes/blocks/paragraph/style.min.css?ver=6.9-alpha-60093-src" 115 media="all" 116 /> 117 <link 118 rel="stylesheet" 119 id="wp-block-group-css" 120 href="http://localhost:8000/wp-includes/blocks/group/style.min.css?ver=6.9-alpha-60093-src" 121 media="all" 122 /> 123 <link 124 rel="stylesheet" 125 id="wp-block-group-theme-css" 126 href="http://localhost:8000/wp-includes/blocks/group/theme.min.css?ver=6.9-alpha-60093-src" 127 media="all" 128 /> 129 <link 130 rel="stylesheet" 131 id="wp-block-search-css" 132 href="http://localhost:8000/wp-includes/blocks/search/style.min.css?ver=6.9-alpha-60093-src" 133 media="all" 134 /> 135 <link 136 rel="stylesheet" 137 id="wp-block-search-theme-css" 138 href="http://localhost:8000/wp-includes/blocks/search/theme.min.css?ver=6.9-alpha-60093-src" 139 media="all" 140 /> 141 <link 142 rel="stylesheet" 143 id="wp-block-heading-css" 144 href="http://localhost:8000/wp-includes/blocks/heading/style.min.css?ver=6.9-alpha-60093-src" 145 media="all" 146 /> 147 <link 148 rel="stylesheet" 149 id="wp-block-latest-posts-css" 150 href="http://localhost:8000/wp-includes/blocks/latest-posts/style.min.css?ver=6.9-alpha-60093-src" 151 media="all" 152 /> 153 <link 154 rel="stylesheet" 155 id="wp-block-latest-comments-css" 156 href="http://localhost:8000/wp-includes/blocks/latest-comments/style.min.css?ver=6.9-alpha-60093-src" 157 media="all" 158 /> 159 <link 160 rel="stylesheet" 161 id="wp-block-archives-css" 162 href="http://localhost:8000/wp-includes/blocks/archives/style.min.css?ver=6.9-alpha-60093-src" 163 media="all" 164 /> 165 <link 166 rel="stylesheet" 167 id="wp-block-categories-css" 168 href="http://localhost:8000/wp-includes/blocks/categories/style.min.css?ver=6.9-alpha-60093-src" 169 media="all" 170 /> 87 171 <style id="global-styles-inline-css"> 88 172 :root { 89 173 --wp--preset--aspect-ratio--square: 1; … … 451 535 .has-x-large-font-size { 452 536 font-size: var(--wp--preset--font-size--x-large) !important; 453 537 } 454 :where(.wp-block-post-template.is-layout-flex) { 455 gap: 1.25em; 538 /*# sourceURL=global-styles-inline-css */ 539 </style> 540 <style id="core-block-supports-inline-css"> 541 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull { 542 margin-right: calc(var(--wp--preset--spacing--50) * -1); 543 margin-left: calc(var(--wp--preset--spacing--50) * -1); 456 544 } 457 :where(.wp-block-post-template.is-layout-grid) { 458 gap: 1.25em; 459 } 460 :where(.wp-block-columns.is-layout-flex) { 461 gap: 2em; 462 } 463 :where(.wp-block-columns.is-layout-grid) { 464 gap: 2em; 465 } 466 :root :where(.wp-block-pullquote) { 467 font-size: 1.5em; 468 line-height: 1.6; 545 /*# sourceURL=core-block-supports-inline-css */ 546 </style> 547 <style id="core-block-supports-duotone-inline-css"> 548 .wp-duotone-f6cff4-ffee58-1.wp-block-image img, 549 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder { 550 filter: url(#wp-duotone-f6cff4-ffee58-1); 469 551 } 470 /*# sourceURL= global-styles-inline-css */552 /*# sourceURL=core-block-supports-duotone-inline-css */ 471 553 </style> 472 <link473 rel="stylesheet"474 id="twenty-twenty-one-style-css"475 href="http://localhost:8000/wp-content/themes/twentytwentyone/style.css?ver=2.6"476 media="all"477 />478 <link479 rel="stylesheet"480 id="twenty-twenty-one-print-style-css"481 href="http://localhost:8000/wp-content/themes/twentytwentyone/assets/css/print.css?ver=2.6"482 media="print"483 />484 <link485 rel="stylesheet"486 id="tt1-dark-mode-css"487 href="http://localhost:8000/wp-content/themes/twentytwentyone/assets/css/style-dark-mode.css?ver=2.6"488 media="all"489 />490 554 <script id="twenty-twenty-one-ie11-polyfills-js-after"> 491 555 (Element.prototype.matches && 492 556 Element.prototype.closest && … … 1260 1324 } 1261 1325 //# sourceURL=twentytwentyone_add_ie_class 1262 1326 </script> 1263 <style id="core-block-supports-inline-css">1264 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull {1265 margin-right: calc(var(--wp--preset--spacing--50) * -1);1266 margin-left: calc(var(--wp--preset--spacing--50) * -1);1267 }1268 /*# sourceURL=core-block-supports-inline-css */1269 </style>1270 <style id="core-block-supports-duotone-inline-css">1271 .wp-duotone-f6cff4-ffee58-1.wp-block-image img,1272 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder {1273 filter: url(#wp-duotone-f6cff4-ffee58-1);1274 }1275 /*# sourceURL=core-block-supports-duotone-inline-css */1276 </style>1277 1327 <script 1278 1328 src="http://localhost:8000/wp-content/themes/twentytwentyone/assets/js/dark-mode-toggler.js?ver=1.0.0" 1279 1329 id="twentytwentyone-dark-mode-support-toggle-js"
These styles seem to be missing with the changes in this PR:
:where(.wp-block-post-template.is-layout-flex) { gap: 1.25em; } :where(.wp-block-post-template.is-layout-grid) { gap: 1.25em; } :where(.wp-block-columns.is-layout-flex) { gap: 2em; } :where(.wp-block-columns.is-layout-grid) { gap: 2em; } :root :where(.wp-block-pullquote) { font-size: 1.5em; line-height: 1.6; }
However, once I added a Quote block to the post, then the :root :where(.wp-block-pullquote) appeared. And when I added a Columns block, then the .wp-block-columns rules showed up. So this indicates that they are successfully being loaded on-demand.
@westonruter commented on PR #10288:
7 weeks ago
#13
@mindctrl commented on PR #10288:
7 weeks ago
#14
This is looking good. I see similar savings when testing against the Twenty Twelve theme.
It seems there's a small increase in processing time and memory use, but it doesn't seem significant. I didn't run an extensive comparison on those things, but here's what Query Monitor shows after doing numerous refreshes to confirm the consistency:
@westonruter commented on PR #10288:
7 weeks ago
#15
I'll commit this in the next hour.
@westonruter commented on PR #10288:
7 weeks ago
#16
When I loading assets on demand:
add_filter( 'should_load_separate_core_block_assets', '__return_false', 1000 ); add_filter( 'should_load_block_assets_on_demand', '__return_false', 1000 );
The before/after diff shows the same order of cascade:
-
.html
old new 418 418 href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715" 419 419 media="all" 420 420 /> 421 <style id="core-block-supports-inline-css"> 422 /** 423 * Core styles: block-supports 424 */ 425 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull { 426 margin-right: calc(var(--wp--preset--spacing--50) * -1); 427 margin-left: calc(var(--wp--preset--spacing--50) * -1); 428 } 429 .wp-container-core-columns-is-layout-9d6595d7 { 430 flex-wrap: nowrap; 431 } 432 .wp-elements-6c33bc3c49cd227fd8339cc6d69a7265 433 a:where(:not(.wp-element-button)) { 434 color: var(--wp--preset--color--base); 435 } 436 .wp-container-core-group-is-layout-45f4d935 > .alignfull { 437 margin-right: calc(var(--wp--preset--spacing--60) * -1); 438 margin-left: calc(var(--wp--preset--spacing--60) * -1); 439 } 440 .wp-container-core-group-is-layout-651e6f64 > .alignfull { 441 margin-right: calc(var(--wp--preset--spacing--30) * -1); 442 margin-left: calc(var(--wp--preset--spacing--30) * -1); 443 } 444 .wp-block-gallery.wp-block-gallery-2 { 445 --wp--style--unstable-gallery-gap: var( 446 --wp--style--gallery-gap-default, 447 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)) 448 ); 449 gap: var( 450 --wp--style--gallery-gap-default, 451 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)) 452 ); 453 } 454 455 /*# sourceURL=core-block-supports-inline-css */ 456 </style> 457 <style id="core-block-supports-duotone-inline-css"> 458 .wp-duotone-f6cff4-ffee58-1.wp-block-image img, 459 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder { 460 filter: url(#wp-duotone-f6cff4-ffee58-1); 461 } 462 463 /*# sourceURL=core-block-supports-duotone-inline-css */ 464 </style> 421 465 <script 422 466 src="http://localhost:8000/wp-includes/js/jquery/jquery.js?ver=3.7.1" 423 467 id="jquery-core-js" … … 3494 3538 </filter> 3495 3539 </defs> 3496 3540 </svg> 3497 3498 <style id="core-block-supports-inline-css">3499 /**3500 * Core styles: block-supports3501 */3502 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull {3503 margin-right: calc(var(--wp--preset--spacing--50) * -1);3504 margin-left: calc(var(--wp--preset--spacing--50) * -1);3505 }3506 .wp-container-core-columns-is-layout-9d6595d7 {3507 flex-wrap: nowrap;3508 }3509 .wp-elements-6c33bc3c49cd227fd8339cc6d69a72653510 a:where(:not(.wp-element-button)) {3511 color: var(--wp--preset--color--base);3512 }3513 .wp-container-core-group-is-layout-45f4d935 > .alignfull {3514 margin-right: calc(var(--wp--preset--spacing--60) * -1);3515 margin-left: calc(var(--wp--preset--spacing--60) * -1);3516 }3517 .wp-container-core-group-is-layout-651e6f64 > .alignfull {3518 margin-right: calc(var(--wp--preset--spacing--30) * -1);3519 margin-left: calc(var(--wp--preset--spacing--30) * -1);3520 }3521 .wp-block-gallery.wp-block-gallery-2 {3522 --wp--style--unstable-gallery-gap: var(3523 --wp--style--gallery-gap-default,3524 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em))3525 );3526 gap: var(3527 --wp--style--gallery-gap-default,3528 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em))3529 );3530 }3531 3541 3532 /*# sourceURL=core-block-supports-inline-css */3533 </style>3534 <style id="core-block-supports-duotone-inline-css">3535 .wp-duotone-f6cff4-ffee58-1.wp-block-image img,3536 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder {3537 filter: url(#wp-duotone-f6cff4-ffee58-1);3538 }3539 3540 /*# sourceURL=core-block-supports-duotone-inline-css */3541 </style>3542 3542 <script 3543 3543 src="http://localhost:8000/wp-includes/js/wp-embed.js?ver=6.9-alpha-60093-src" 3544 3544 id="wp-embed-js"
What was previously printed in the wp_footer is now printed at wp_head, which is great as that reduces FOUC.
@westonruter commented on PR #10288:
7 weeks ago
#17
In contrast, when I force styles to be loaded on demand:
add_filter( 'should_load_separate_core_block_assets', '__return_true', 1000 );
add_filter( 'should_load_block_assets_on_demand', '__return_true', 1000 );
This is the diff I see:
-
.html
old new 76 76 href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715" 77 77 media="all" 78 78 /> 79 <link 80 rel="stylesheet" 81 id="wp-block-image-css" 82 href="http://localhost:8000/wp-includes/blocks/image/style.css?ver=6.9-alpha-60093-src" 83 media="all" 84 /> 85 <link 86 rel="stylesheet" 87 id="wp-block-image-theme-css" 88 href="http://localhost:8000/wp-includes/blocks/image/theme.css?ver=6.9-alpha-60093-src" 89 media="all" 90 /> 91 <link 92 rel="stylesheet" 93 id="wp-block-paragraph-css" 94 href="http://localhost:8000/wp-includes/blocks/paragraph/style.css?ver=6.9-alpha-60093-src" 95 media="all" 96 /> 97 <link 98 rel="stylesheet" 99 id="wp-block-group-css" 100 href="http://localhost:8000/wp-includes/blocks/group/style.css?ver=6.9-alpha-60093-src" 101 media="all" 102 /> 103 <link 104 rel="stylesheet" 105 id="wp-block-group-theme-css" 106 href="http://localhost:8000/wp-includes/blocks/group/theme.css?ver=6.9-alpha-60093-src" 107 media="all" 108 /> 109 <link 110 rel="stylesheet" 111 id="wp-block-pullquote-css" 112 href="http://localhost:8000/wp-includes/blocks/pullquote/style.css?ver=6.9-alpha-60093-src" 113 media="all" 114 /> 115 <link 116 rel="stylesheet" 117 id="wp-block-pullquote-theme-css" 118 href="http://localhost:8000/wp-includes/blocks/pullquote/theme.css?ver=6.9-alpha-60093-src" 119 media="all" 120 /> 121 <link 122 rel="stylesheet" 123 id="wp-block-columns-css" 124 href="http://localhost:8000/wp-includes/blocks/columns/style.css?ver=6.9-alpha-60093-src" 125 media="all" 126 /> 127 <link 128 rel="stylesheet" 129 id="wp-block-cover-css" 130 href="http://localhost:8000/wp-includes/blocks/cover/style.css?ver=6.9-alpha-60093-src" 131 media="all" 132 /> 133 <link 134 rel="stylesheet" 135 id="wp-block-social-links-css" 136 href="http://localhost:8000/wp-includes/blocks/social-links/style.css?ver=6.9-alpha-60093-src" 137 media="all" 138 /> 139 <link 140 rel="stylesheet" 141 id="wp-block-embed-css" 142 href="http://localhost:8000/wp-includes/blocks/embed/style.css?ver=6.9-alpha-60093-src" 143 media="all" 144 /> 145 <link 146 rel="stylesheet" 147 id="wp-block-embed-theme-css" 148 href="http://localhost:8000/wp-includes/blocks/embed/theme.css?ver=6.9-alpha-60093-src" 149 media="all" 150 /> 151 <link 152 rel="stylesheet" 153 id="wp-block-categories-css" 154 href="http://localhost:8000/wp-includes/blocks/categories/style.css?ver=6.9-alpha-60093-src" 155 media="all" 156 /> 157 <link 158 rel="stylesheet" 159 id="wp-block-gallery-css" 160 href="http://localhost:8000/wp-includes/blocks/gallery/style.css?ver=6.9-alpha-60093-src" 161 media="all" 162 /> 163 <link 164 rel="stylesheet" 165 id="wp-block-gallery-theme-css" 166 href="http://localhost:8000/wp-includes/blocks/gallery/theme.css?ver=6.9-alpha-60093-src" 167 media="all" 168 /> 169 <link 170 rel="stylesheet" 171 id="wp-block-search-css" 172 href="http://localhost:8000/wp-includes/blocks/search/style.css?ver=6.9-alpha-60093-src" 173 media="all" 174 /> 175 <link 176 rel="stylesheet" 177 id="wp-block-search-theme-css" 178 href="http://localhost:8000/wp-includes/blocks/search/theme.css?ver=6.9-alpha-60093-src" 179 media="all" 180 /> 181 <link 182 rel="stylesheet" 183 id="wp-block-heading-css" 184 href="http://localhost:8000/wp-includes/blocks/heading/style.css?ver=6.9-alpha-60093-src" 185 media="all" 186 /> 187 <link 188 rel="stylesheet" 189 id="wp-block-latest-posts-css" 190 href="http://localhost:8000/wp-includes/blocks/latest-posts/style.css?ver=6.9-alpha-60093-src" 191 media="all" 192 /> 193 <link 194 rel="stylesheet" 195 id="wp-block-latest-comments-css" 196 href="http://localhost:8000/wp-includes/blocks/latest-comments/style.css?ver=6.9-alpha-60093-src" 197 media="all" 198 /> 199 <link 200 rel="stylesheet" 201 id="wp-block-archives-css" 202 href="http://localhost:8000/wp-includes/blocks/archives/style.css?ver=6.9-alpha-60093-src" 203 media="all" 204 /> 205 <style id="global-styles-inline-css"> 206 :root { 207 --wp--preset--aspect-ratio--square: 1; 208 --wp--preset--aspect-ratio--4-3: 4/3; 209 --wp--preset--aspect-ratio--3-4: 3/4; 210 --wp--preset--aspect-ratio--3-2: 3/2; 211 --wp--preset--aspect-ratio--2-3: 2/3; 212 --wp--preset--aspect-ratio--16-9: 16/9; 213 --wp--preset--aspect-ratio--9-16: 9/16; 214 --wp--preset--color--black: #000; 215 --wp--preset--color--cyan-bluish-gray: #abb8c3; 216 --wp--preset--color--white: #fff; 217 --wp--preset--color--pale-pink: #f78da7; 218 --wp--preset--color--vivid-red: #cf2e2e; 219 --wp--preset--color--luminous-vivid-orange: #ff6900; 220 --wp--preset--color--luminous-vivid-amber: #fcb900; 221 --wp--preset--color--light-green-cyan: #7bdcb5; 222 --wp--preset--color--vivid-green-cyan: #00d084; 223 --wp--preset--color--pale-cyan-blue: #8ed1fc; 224 --wp--preset--color--vivid-cyan-blue: #0693e3; 225 --wp--preset--color--vivid-purple: #9b51e0; 226 --wp--preset--color--green: #24890d; 227 --wp--preset--color--dark-gray: #2b2b2b; 228 --wp--preset--color--medium-gray: #767676; 229 --wp--preset--color--light-gray: #f5f5f5; 230 --wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient( 231 135deg, 232 rgb(6, 147, 227) 0%, 233 rgb(155, 81, 224) 100% 234 ); 235 --wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient( 236 135deg, 237 rgb(122, 220, 180) 0%, 238 rgb(0, 208, 130) 100% 239 ); 240 --wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient( 241 135deg, 242 rgb(252, 185, 0) 0%, 243 rgb(255, 105, 0) 100% 244 ); 245 --wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient( 246 135deg, 247 rgb(255, 105, 0) 0%, 248 rgb(207, 46, 46) 100% 249 ); 250 --wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient( 251 135deg, 252 rgb(238, 238, 238) 0%, 253 rgb(169, 184, 195) 100% 254 ); 255 --wp--preset--gradient--cool-to-warm-spectrum: linear-gradient( 256 135deg, 257 rgb(74, 234, 220) 0%, 258 rgb(151, 120, 209) 20%, 259 rgb(207, 42, 186) 40%, 260 rgb(238, 44, 130) 60%, 261 rgb(251, 105, 98) 80%, 262 rgb(254, 248, 76) 100% 263 ); 264 --wp--preset--gradient--blush-light-purple: linear-gradient( 265 135deg, 266 rgb(255, 206, 236) 0%, 267 rgb(152, 150, 240) 100% 268 ); 269 --wp--preset--gradient--blush-bordeaux: linear-gradient( 270 135deg, 271 rgb(254, 205, 165) 0%, 272 rgb(254, 45, 45) 50%, 273 rgb(107, 0, 62) 100% 274 ); 275 --wp--preset--gradient--luminous-dusk: linear-gradient( 276 135deg, 277 rgb(255, 203, 112) 0%, 278 rgb(199, 81, 192) 50%, 279 rgb(65, 88, 208) 100% 280 ); 281 --wp--preset--gradient--pale-ocean: linear-gradient( 282 135deg, 283 rgb(255, 245, 203) 0%, 284 rgb(182, 227, 212) 50%, 285 rgb(51, 167, 181) 100% 286 ); 287 --wp--preset--gradient--electric-grass: linear-gradient( 288 135deg, 289 rgb(202, 248, 128) 0%, 290 rgb(113, 206, 126) 100% 291 ); 292 --wp--preset--gradient--midnight: linear-gradient( 293 135deg, 294 rgb(2, 3, 129) 0%, 295 rgb(40, 116, 252) 100% 296 ); 297 --wp--preset--font-size--small: 13px; 298 --wp--preset--font-size--medium: 20px; 299 --wp--preset--font-size--large: 36px; 300 --wp--preset--font-size--x-large: 42px; 301 --wp--preset--spacing--20: 0.44rem; 302 --wp--preset--spacing--30: 0.67rem; 303 --wp--preset--spacing--40: 1rem; 304 --wp--preset--spacing--50: 1.5rem; 305 --wp--preset--spacing--60: 2.25rem; 306 --wp--preset--spacing--70: 3.38rem; 307 --wp--preset--spacing--80: 5.06rem; 308 --wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2); 309 --wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4); 310 --wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2); 311 --wp--preset--shadow--outlined: 312 6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0); 313 --wp--preset--shadow--crisp: 6px 6px 0px rgb(0, 0, 0); 314 } 315 :where(.is-layout-flex) { 316 gap: 0.5em; 317 } 318 :where(.is-layout-grid) { 319 gap: 0.5em; 320 } 321 body .is-layout-flex { 322 display: flex; 323 } 324 .is-layout-flex { 325 flex-wrap: wrap; 326 align-items: center; 327 } 328 .is-layout-flex > :is(*, div) { 329 margin: 0; 330 } 331 body .is-layout-grid { 332 display: grid; 333 } 334 .is-layout-grid > :is(*, div) { 335 margin: 0; 336 } 337 :where(.wp-block-columns.is-layout-flex) { 338 gap: 2em; 339 } 340 :where(.wp-block-columns.is-layout-grid) { 341 gap: 2em; 342 } 343 :where(.wp-block-post-template.is-layout-flex) { 344 gap: 1.25em; 345 } 346 :where(.wp-block-post-template.is-layout-grid) { 347 gap: 1.25em; 348 } 349 .has-black-color { 350 color: var(--wp--preset--color--black) !important; 351 } 352 .has-cyan-bluish-gray-color { 353 color: var(--wp--preset--color--cyan-bluish-gray) !important; 354 } 355 .has-white-color { 356 color: var(--wp--preset--color--white) !important; 357 } 358 .has-pale-pink-color { 359 color: var(--wp--preset--color--pale-pink) !important; 360 } 361 .has-vivid-red-color { 362 color: var(--wp--preset--color--vivid-red) !important; 363 } 364 .has-luminous-vivid-orange-color { 365 color: var(--wp--preset--color--luminous-vivid-orange) !important; 366 } 367 .has-luminous-vivid-amber-color { 368 color: var(--wp--preset--color--luminous-vivid-amber) !important; 369 } 370 .has-light-green-cyan-color { 371 color: var(--wp--preset--color--light-green-cyan) !important; 372 } 373 .has-vivid-green-cyan-color { 374 color: var(--wp--preset--color--vivid-green-cyan) !important; 375 } 376 .has-pale-cyan-blue-color { 377 color: var(--wp--preset--color--pale-cyan-blue) !important; 378 } 379 .has-vivid-cyan-blue-color { 380 color: var(--wp--preset--color--vivid-cyan-blue) !important; 381 } 382 .has-vivid-purple-color { 383 color: var(--wp--preset--color--vivid-purple) !important; 384 } 385 .has-black-background-color { 386 background-color: var(--wp--preset--color--black) !important; 387 } 388 .has-cyan-bluish-gray-background-color { 389 background-color: var(--wp--preset--color--cyan-bluish-gray) !important; 390 } 391 .has-white-background-color { 392 background-color: var(--wp--preset--color--white) !important; 393 } 394 .has-pale-pink-background-color { 395 background-color: var(--wp--preset--color--pale-pink) !important; 396 } 397 .has-vivid-red-background-color { 398 background-color: var(--wp--preset--color--vivid-red) !important; 399 } 400 .has-luminous-vivid-orange-background-color { 401 background-color: var( 402 --wp--preset--color--luminous-vivid-orange 403 ) !important; 404 } 405 .has-luminous-vivid-amber-background-color { 406 background-color: var( 407 --wp--preset--color--luminous-vivid-amber 408 ) !important; 409 } 410 .has-light-green-cyan-background-color { 411 background-color: var(--wp--preset--color--light-green-cyan) !important; 412 } 413 .has-vivid-green-cyan-background-color { 414 background-color: var(--wp--preset--color--vivid-green-cyan) !important; 415 } 416 .has-pale-cyan-blue-background-color { 417 background-color: var(--wp--preset--color--pale-cyan-blue) !important; 418 } 419 .has-vivid-cyan-blue-background-color { 420 background-color: var(--wp--preset--color--vivid-cyan-blue) !important; 421 } 422 .has-vivid-purple-background-color { 423 background-color: var(--wp--preset--color--vivid-purple) !important; 424 } 425 .has-black-border-color { 426 border-color: var(--wp--preset--color--black) !important; 427 } 428 .has-cyan-bluish-gray-border-color { 429 border-color: var(--wp--preset--color--cyan-bluish-gray) !important; 430 } 431 .has-white-border-color { 432 border-color: var(--wp--preset--color--white) !important; 433 } 434 .has-pale-pink-border-color { 435 border-color: var(--wp--preset--color--pale-pink) !important; 436 } 437 .has-vivid-red-border-color { 438 border-color: var(--wp--preset--color--vivid-red) !important; 439 } 440 .has-luminous-vivid-orange-border-color { 441 border-color: var( 442 --wp--preset--color--luminous-vivid-orange 443 ) !important; 444 } 445 .has-luminous-vivid-amber-border-color { 446 border-color: var(--wp--preset--color--luminous-vivid-amber) !important; 447 } 448 .has-light-green-cyan-border-color { 449 border-color: var(--wp--preset--color--light-green-cyan) !important; 450 } 451 .has-vivid-green-cyan-border-color { 452 border-color: var(--wp--preset--color--vivid-green-cyan) !important; 453 } 454 .has-pale-cyan-blue-border-color { 455 border-color: var(--wp--preset--color--pale-cyan-blue) !important; 456 } 457 .has-vivid-cyan-blue-border-color { 458 border-color: var(--wp--preset--color--vivid-cyan-blue) !important; 459 } 460 .has-vivid-purple-border-color { 461 border-color: var(--wp--preset--color--vivid-purple) !important; 462 } 463 .has-vivid-cyan-blue-to-vivid-purple-gradient-background { 464 background: var( 465 --wp--preset--gradient--vivid-cyan-blue-to-vivid-purple 466 ) !important; 467 } 468 .has-light-green-cyan-to-vivid-green-cyan-gradient-background { 469 background: var( 470 --wp--preset--gradient--light-green-cyan-to-vivid-green-cyan 471 ) !important; 472 } 473 .has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background { 474 background: var( 475 --wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange 476 ) !important; 477 } 478 .has-luminous-vivid-orange-to-vivid-red-gradient-background { 479 background: var( 480 --wp--preset--gradient--luminous-vivid-orange-to-vivid-red 481 ) !important; 482 } 483 .has-very-light-gray-to-cyan-bluish-gray-gradient-background { 484 background: var( 485 --wp--preset--gradient--very-light-gray-to-cyan-bluish-gray 486 ) !important; 487 } 488 .has-cool-to-warm-spectrum-gradient-background { 489 background: var( 490 --wp--preset--gradient--cool-to-warm-spectrum 491 ) !important; 492 } 493 .has-blush-light-purple-gradient-background { 494 background: var(--wp--preset--gradient--blush-light-purple) !important; 495 } 496 .has-blush-bordeaux-gradient-background { 497 background: var(--wp--preset--gradient--blush-bordeaux) !important; 498 } 499 .has-luminous-dusk-gradient-background { 500 background: var(--wp--preset--gradient--luminous-dusk) !important; 501 } 502 .has-pale-ocean-gradient-background { 503 background: var(--wp--preset--gradient--pale-ocean) !important; 504 } 505 .has-electric-grass-gradient-background { 506 background: var(--wp--preset--gradient--electric-grass) !important; 507 } 508 .has-midnight-gradient-background { 509 background: var(--wp--preset--gradient--midnight) !important; 510 } 511 .has-small-font-size { 512 font-size: var(--wp--preset--font-size--small) !important; 513 } 514 .has-medium-font-size { 515 font-size: var(--wp--preset--font-size--medium) !important; 516 } 517 .has-large-font-size { 518 font-size: var(--wp--preset--font-size--large) !important; 519 } 520 .has-x-large-font-size { 521 font-size: var(--wp--preset--font-size--x-large) !important; 522 } 523 :where(.wp-block-columns.is-layout-flex) { 524 gap: 2em; 525 } 526 :where(.wp-block-columns.is-layout-grid) { 527 gap: 2em; 528 } 529 :root :where(.wp-block-pullquote) { 530 font-size: 1.5em; 531 line-height: 1.6; 532 } 533 /*# sourceURL=global-styles-inline-css */ 534 </style> 535 <style id="core-block-supports-inline-css"> 536 /** 537 * Core styles: block-supports 538 */ 539 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull { 540 margin-right: calc(var(--wp--preset--spacing--50) * -1); 541 margin-left: calc(var(--wp--preset--spacing--50) * -1); 542 } 543 .wp-container-core-columns-is-layout-9d6595d7 { 544 flex-wrap: nowrap; 545 } 546 .wp-elements-6c33bc3c49cd227fd8339cc6d69a7265 547 a:where(:not(.wp-element-button)) { 548 color: var(--wp--preset--color--base); 549 } 550 .wp-container-core-group-is-layout-45f4d935 > .alignfull { 551 margin-right: calc(var(--wp--preset--spacing--60) * -1); 552 margin-left: calc(var(--wp--preset--spacing--60) * -1); 553 } 554 .wp-container-core-group-is-layout-651e6f64 > .alignfull { 555 margin-right: calc(var(--wp--preset--spacing--30) * -1); 556 margin-left: calc(var(--wp--preset--spacing--30) * -1); 557 } 558 .wp-block-gallery.wp-block-gallery-2 { 559 --wp--style--unstable-gallery-gap: var( 560 --wp--style--gallery-gap-default, 561 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)) 562 ); 563 gap: var( 564 --wp--style--gallery-gap-default, 565 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)) 566 ); 567 } 568 569 /*# sourceURL=core-block-supports-inline-css */ 570 </style> 571 <style id="core-block-supports-duotone-inline-css"> 572 .wp-duotone-f6cff4-ffee58-1.wp-block-image img, 573 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder { 574 filter: url(#wp-duotone-f6cff4-ffee58-1); 575 } 576 577 /*# sourceURL=core-block-supports-duotone-inline-css */ 578 </style> 79 579 <script 80 580 src="http://localhost:8000/wp-includes/js/jquery/jquery.js?ver=3.7.1" 81 581 id="jquery-core-js" … … 3152 3652 </filter> 3153 3653 </defs> 3154 3654 </svg> 3155 3156 <link3157 rel="stylesheet"3158 id="wp-block-image-css"3159 href="http://localhost:8000/wp-includes/blocks/image/style.css?ver=6.9-alpha-60093-src"3160 media="all"3161 />3162 <link3163 rel="stylesheet"3164 id="wp-block-image-theme-css"3165 href="http://localhost:8000/wp-includes/blocks/image/theme.css?ver=6.9-alpha-60093-src"3166 media="all"3167 />3168 <link3169 rel="stylesheet"3170 id="wp-block-paragraph-css"3171 href="http://localhost:8000/wp-includes/blocks/paragraph/style.css?ver=6.9-alpha-60093-src"3172 media="all"3173 />3174 <link3175 rel="stylesheet"3176 id="wp-block-group-css"3177 href="http://localhost:8000/wp-includes/blocks/group/style.css?ver=6.9-alpha-60093-src"3178 media="all"3179 />3180 <link3181 rel="stylesheet"3182 id="wp-block-group-theme-css"3183 href="http://localhost:8000/wp-includes/blocks/group/theme.css?ver=6.9-alpha-60093-src"3184 media="all"3185 />3186 <link3187 rel="stylesheet"3188 id="wp-block-pullquote-css"3189 href="http://localhost:8000/wp-includes/blocks/pullquote/style.css?ver=6.9-alpha-60093-src"3190 media="all"3191 />3192 <link3193 rel="stylesheet"3194 id="wp-block-pullquote-theme-css"3195 href="http://localhost:8000/wp-includes/blocks/pullquote/theme.css?ver=6.9-alpha-60093-src"3196 media="all"3197 />3198 <link3199 rel="stylesheet"3200 id="wp-block-columns-css"3201 href="http://localhost:8000/wp-includes/blocks/columns/style.css?ver=6.9-alpha-60093-src"3202 media="all"3203 />3204 <link3205 rel="stylesheet"3206 id="wp-block-cover-css"3207 href="http://localhost:8000/wp-includes/blocks/cover/style.css?ver=6.9-alpha-60093-src"3208 media="all"3209 />3210 <link3211 rel="stylesheet"3212 id="wp-block-social-links-css"3213 href="http://localhost:8000/wp-includes/blocks/social-links/style.css?ver=6.9-alpha-60093-src"3214 media="all"3215 />3216 <link3217 rel="stylesheet"3218 id="wp-block-embed-css"3219 href="http://localhost:8000/wp-includes/blocks/embed/style.css?ver=6.9-alpha-60093-src"3220 media="all"3221 />3222 <link3223 rel="stylesheet"3224 id="wp-block-embed-theme-css"3225 href="http://localhost:8000/wp-includes/blocks/embed/theme.css?ver=6.9-alpha-60093-src"3226 media="all"3227 />3228 <link3229 rel="stylesheet"3230 id="wp-block-categories-css"3231 href="http://localhost:8000/wp-includes/blocks/categories/style.css?ver=6.9-alpha-60093-src"3232 media="all"3233 />3234 <link3235 rel="stylesheet"3236 id="wp-block-gallery-css"3237 href="http://localhost:8000/wp-includes/blocks/gallery/style.css?ver=6.9-alpha-60093-src"3238 media="all"3239 />3240 <link3241 rel="stylesheet"3242 id="wp-block-gallery-theme-css"3243 href="http://localhost:8000/wp-includes/blocks/gallery/theme.css?ver=6.9-alpha-60093-src"3244 media="all"3245 />3246 <link3247 rel="stylesheet"3248 id="wp-block-search-css"3249 href="http://localhost:8000/wp-includes/blocks/search/style.css?ver=6.9-alpha-60093-src"3250 media="all"3251 />3252 <link3253 rel="stylesheet"3254 id="wp-block-search-theme-css"3255 href="http://localhost:8000/wp-includes/blocks/search/theme.css?ver=6.9-alpha-60093-src"3256 media="all"3257 />3258 <link3259 rel="stylesheet"3260 id="wp-block-heading-css"3261 href="http://localhost:8000/wp-includes/blocks/heading/style.css?ver=6.9-alpha-60093-src"3262 media="all"3263 />3264 <link3265 rel="stylesheet"3266 id="wp-block-latest-posts-css"3267 href="http://localhost:8000/wp-includes/blocks/latest-posts/style.css?ver=6.9-alpha-60093-src"3268 media="all"3269 />3270 <link3271 rel="stylesheet"3272 id="wp-block-latest-comments-css"3273 href="http://localhost:8000/wp-includes/blocks/latest-comments/style.css?ver=6.9-alpha-60093-src"3274 media="all"3275 />3276 <link3277 rel="stylesheet"3278 id="wp-block-archives-css"3279 href="http://localhost:8000/wp-includes/blocks/archives/style.css?ver=6.9-alpha-60093-src"3280 media="all"3281 />3282 <style id="global-styles-inline-css">3283 :root {3284 --wp--preset--aspect-ratio--square: 1;3285 --wp--preset--aspect-ratio--4-3: 4/3;3286 --wp--preset--aspect-ratio--3-4: 3/4;3287 --wp--preset--aspect-ratio--3-2: 3/2;3288 --wp--preset--aspect-ratio--2-3: 2/3;3289 --wp--preset--aspect-ratio--16-9: 16/9;3290 --wp--preset--aspect-ratio--9-16: 9/16;3291 --wp--preset--color--black: #000;3292 --wp--preset--color--cyan-bluish-gray: #abb8c3;3293 --wp--preset--color--white: #fff;3294 --wp--preset--color--pale-pink: #f78da7;3295 --wp--preset--color--vivid-red: #cf2e2e;3296 --wp--preset--color--luminous-vivid-orange: #ff6900;3297 --wp--preset--color--luminous-vivid-amber: #fcb900;3298 --wp--preset--color--light-green-cyan: #7bdcb5;3299 --wp--preset--color--vivid-green-cyan: #00d084;3300 --wp--preset--color--pale-cyan-blue: #8ed1fc;3301 --wp--preset--color--vivid-cyan-blue: #0693e3;3302 --wp--preset--color--vivid-purple: #9b51e0;3303 --wp--preset--color--green: #24890d;3304 --wp--preset--color--dark-gray: #2b2b2b;3305 --wp--preset--color--medium-gray: #767676;3306 --wp--preset--color--light-gray: #f5f5f5;3307 --wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(3308 135deg,3309 rgb(6, 147, 227) 0%,3310 rgb(155, 81, 224) 100%3311 );3312 --wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(3313 135deg,3314 rgb(122, 220, 180) 0%,3315 rgb(0, 208, 130) 100%3316 );3317 --wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(3318 135deg,3319 rgb(252, 185, 0) 0%,3320 rgb(255, 105, 0) 100%3321 );3322 --wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(3323 135deg,3324 rgb(255, 105, 0) 0%,3325 rgb(207, 46, 46) 100%3326 );3327 --wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(3328 135deg,3329 rgb(238, 238, 238) 0%,3330 rgb(169, 184, 195) 100%3331 );3332 --wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(3333 135deg,3334 rgb(74, 234, 220) 0%,3335 rgb(151, 120, 209) 20%,3336 rgb(207, 42, 186) 40%,3337 rgb(238, 44, 130) 60%,3338 rgb(251, 105, 98) 80%,3339 rgb(254, 248, 76) 100%3340 );3341 --wp--preset--gradient--blush-light-purple: linear-gradient(3342 135deg,3343 rgb(255, 206, 236) 0%,3344 rgb(152, 150, 240) 100%3345 );3346 --wp--preset--gradient--blush-bordeaux: linear-gradient(3347 135deg,3348 rgb(254, 205, 165) 0%,3349 rgb(254, 45, 45) 50%,3350 rgb(107, 0, 62) 100%3351 );3352 --wp--preset--gradient--luminous-dusk: linear-gradient(3353 135deg,3354 rgb(255, 203, 112) 0%,3355 rgb(199, 81, 192) 50%,3356 rgb(65, 88, 208) 100%3357 );3358 --wp--preset--gradient--pale-ocean: linear-gradient(3359 135deg,3360 rgb(255, 245, 203) 0%,3361 rgb(182, 227, 212) 50%,3362 rgb(51, 167, 181) 100%3363 );3364 --wp--preset--gradient--electric-grass: linear-gradient(3365 135deg,3366 rgb(202, 248, 128) 0%,3367 rgb(113, 206, 126) 100%3368 );3369 --wp--preset--gradient--midnight: linear-gradient(3370 135deg,3371 rgb(2, 3, 129) 0%,3372 rgb(40, 116, 252) 100%3373 );3374 --wp--preset--font-size--small: 13px;3375 --wp--preset--font-size--medium: 20px;3376 --wp--preset--font-size--large: 36px;3377 --wp--preset--font-size--x-large: 42px;3378 --wp--preset--spacing--20: 0.44rem;3379 --wp--preset--spacing--30: 0.67rem;3380 --wp--preset--spacing--40: 1rem;3381 --wp--preset--spacing--50: 1.5rem;3382 --wp--preset--spacing--60: 2.25rem;3383 --wp--preset--spacing--70: 3.38rem;3384 --wp--preset--spacing--80: 5.06rem;3385 --wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);3386 --wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);3387 --wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);3388 --wp--preset--shadow--outlined:3389 6px 6px 0px -3px rgb(255, 255, 255), 6px 6px rgb(0, 0, 0);3390 --wp--preset--shadow--crisp: 6px 6px 0px rgb(0, 0, 0);3391 }3392 :where(.is-layout-flex) {3393 gap: 0.5em;3394 }3395 :where(.is-layout-grid) {3396 gap: 0.5em;3397 }3398 body .is-layout-flex {3399 display: flex;3400 }3401 .is-layout-flex {3402 flex-wrap: wrap;3403 align-items: center;3404 }3405 .is-layout-flex > :is(*, div) {3406 margin: 0;3407 }3408 body .is-layout-grid {3409 display: grid;3410 }3411 .is-layout-grid > :is(*, div) {3412 margin: 0;3413 }3414 :where(.wp-block-columns.is-layout-flex) {3415 gap: 2em;3416 }3417 :where(.wp-block-columns.is-layout-grid) {3418 gap: 2em;3419 }3420 :where(.wp-block-post-template.is-layout-flex) {3421 gap: 1.25em;3422 }3423 :where(.wp-block-post-template.is-layout-grid) {3424 gap: 1.25em;3425 }3426 .has-black-color {3427 color: var(--wp--preset--color--black) !important;3428 }3429 .has-cyan-bluish-gray-color {3430 color: var(--wp--preset--color--cyan-bluish-gray) !important;3431 }3432 .has-white-color {3433 color: var(--wp--preset--color--white) !important;3434 }3435 .has-pale-pink-color {3436 color: var(--wp--preset--color--pale-pink) !important;3437 }3438 .has-vivid-red-color {3439 color: var(--wp--preset--color--vivid-red) !important;3440 }3441 .has-luminous-vivid-orange-color {3442 color: var(--wp--preset--color--luminous-vivid-orange) !important;3443 }3444 .has-luminous-vivid-amber-color {3445 color: var(--wp--preset--color--luminous-vivid-amber) !important;3446 }3447 .has-light-green-cyan-color {3448 color: var(--wp--preset--color--light-green-cyan) !important;3449 }3450 .has-vivid-green-cyan-color {3451 color: var(--wp--preset--color--vivid-green-cyan) !important;3452 }3453 .has-pale-cyan-blue-color {3454 color: var(--wp--preset--color--pale-cyan-blue) !important;3455 }3456 .has-vivid-cyan-blue-color {3457 color: var(--wp--preset--color--vivid-cyan-blue) !important;3458 }3459 .has-vivid-purple-color {3460 color: var(--wp--preset--color--vivid-purple) !important;3461 }3462 .has-black-background-color {3463 background-color: var(--wp--preset--color--black) !important;3464 }3465 .has-cyan-bluish-gray-background-color {3466 background-color: var(--wp--preset--color--cyan-bluish-gray) !important;3467 }3468 .has-white-background-color {3469 background-color: var(--wp--preset--color--white) !important;3470 }3471 .has-pale-pink-background-color {3472 background-color: var(--wp--preset--color--pale-pink) !important;3473 }3474 .has-vivid-red-background-color {3475 background-color: var(--wp--preset--color--vivid-red) !important;3476 }3477 .has-luminous-vivid-orange-background-color {3478 background-color: var(3479 --wp--preset--color--luminous-vivid-orange3480 ) !important;3481 }3482 .has-luminous-vivid-amber-background-color {3483 background-color: var(3484 --wp--preset--color--luminous-vivid-amber3485 ) !important;3486 }3487 .has-light-green-cyan-background-color {3488 background-color: var(--wp--preset--color--light-green-cyan) !important;3489 }3490 .has-vivid-green-cyan-background-color {3491 background-color: var(--wp--preset--color--vivid-green-cyan) !important;3492 }3493 .has-pale-cyan-blue-background-color {3494 background-color: var(--wp--preset--color--pale-cyan-blue) !important;3495 }3496 .has-vivid-cyan-blue-background-color {3497 background-color: var(--wp--preset--color--vivid-cyan-blue) !important;3498 }3499 .has-vivid-purple-background-color {3500 background-color: var(--wp--preset--color--vivid-purple) !important;3501 }3502 .has-black-border-color {3503 border-color: var(--wp--preset--color--black) !important;3504 }3505 .has-cyan-bluish-gray-border-color {3506 border-color: var(--wp--preset--color--cyan-bluish-gray) !important;3507 }3508 .has-white-border-color {3509 border-color: var(--wp--preset--color--white) !important;3510 }3511 .has-pale-pink-border-color {3512 border-color: var(--wp--preset--color--pale-pink) !important;3513 }3514 .has-vivid-red-border-color {3515 border-color: var(--wp--preset--color--vivid-red) !important;3516 }3517 .has-luminous-vivid-orange-border-color {3518 border-color: var(3519 --wp--preset--color--luminous-vivid-orange3520 ) !important;3521 }3522 .has-luminous-vivid-amber-border-color {3523 border-color: var(--wp--preset--color--luminous-vivid-amber) !important;3524 }3525 .has-light-green-cyan-border-color {3526 border-color: var(--wp--preset--color--light-green-cyan) !important;3527 }3528 .has-vivid-green-cyan-border-color {3529 border-color: var(--wp--preset--color--vivid-green-cyan) !important;3530 }3531 .has-pale-cyan-blue-border-color {3532 border-color: var(--wp--preset--color--pale-cyan-blue) !important;3533 }3534 .has-vivid-cyan-blue-border-color {3535 border-color: var(--wp--preset--color--vivid-cyan-blue) !important;3536 }3537 .has-vivid-purple-border-color {3538 border-color: var(--wp--preset--color--vivid-purple) !important;3539 }3540 .has-vivid-cyan-blue-to-vivid-purple-gradient-background {3541 background: var(3542 --wp--preset--gradient--vivid-cyan-blue-to-vivid-purple3543 ) !important;3544 }3545 .has-light-green-cyan-to-vivid-green-cyan-gradient-background {3546 background: var(3547 --wp--preset--gradient--light-green-cyan-to-vivid-green-cyan3548 ) !important;3549 }3550 .has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background {3551 background: var(3552 --wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange3553 ) !important;3554 }3555 .has-luminous-vivid-orange-to-vivid-red-gradient-background {3556 background: var(3557 --wp--preset--gradient--luminous-vivid-orange-to-vivid-red3558 ) !important;3559 }3560 .has-very-light-gray-to-cyan-bluish-gray-gradient-background {3561 background: var(3562 --wp--preset--gradient--very-light-gray-to-cyan-bluish-gray3563 ) !important;3564 }3565 .has-cool-to-warm-spectrum-gradient-background {3566 background: var(3567 --wp--preset--gradient--cool-to-warm-spectrum3568 ) !important;3569 }3570 .has-blush-light-purple-gradient-background {3571 background: var(--wp--preset--gradient--blush-light-purple) !important;3572 }3573 .has-blush-bordeaux-gradient-background {3574 background: var(--wp--preset--gradient--blush-bordeaux) !important;3575 }3576 .has-luminous-dusk-gradient-background {3577 background: var(--wp--preset--gradient--luminous-dusk) !important;3578 }3579 .has-pale-ocean-gradient-background {3580 background: var(--wp--preset--gradient--pale-ocean) !important;3581 }3582 .has-electric-grass-gradient-background {3583 background: var(--wp--preset--gradient--electric-grass) !important;3584 }3585 .has-midnight-gradient-background {3586 background: var(--wp--preset--gradient--midnight) !important;3587 }3588 .has-small-font-size {3589 font-size: var(--wp--preset--font-size--small) !important;3590 }3591 .has-medium-font-size {3592 font-size: var(--wp--preset--font-size--medium) !important;3593 }3594 .has-large-font-size {3595 font-size: var(--wp--preset--font-size--large) !important;3596 }3597 .has-x-large-font-size {3598 font-size: var(--wp--preset--font-size--x-large) !important;3599 }3600 :where(.wp-block-columns.is-layout-flex) {3601 gap: 2em;3602 }3603 :where(.wp-block-columns.is-layout-grid) {3604 gap: 2em;3605 }3606 :root :where(.wp-block-pullquote) {3607 font-size: 1.5em;3608 line-height: 1.6;3609 }3610 /*# sourceURL=global-styles-inline-css */3611 </style>3612 <style id="core-block-supports-inline-css">3613 /**3614 * Core styles: block-supports3615 */3616 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull {3617 margin-right: calc(var(--wp--preset--spacing--50) * -1);3618 margin-left: calc(var(--wp--preset--spacing--50) * -1);3619 }3620 .wp-container-core-columns-is-layout-9d6595d7 {3621 flex-wrap: nowrap;3622 }3623 .wp-elements-6c33bc3c49cd227fd8339cc6d69a72653624 a:where(:not(.wp-element-button)) {3625 color: var(--wp--preset--color--base);3626 }3627 .wp-container-core-group-is-layout-45f4d935 > .alignfull {3628 margin-right: calc(var(--wp--preset--spacing--60) * -1);3629 margin-left: calc(var(--wp--preset--spacing--60) * -1);3630 }3631 .wp-container-core-group-is-layout-651e6f64 > .alignfull {3632 margin-right: calc(var(--wp--preset--spacing--30) * -1);3633 margin-left: calc(var(--wp--preset--spacing--30) * -1);3634 }3635 .wp-block-gallery.wp-block-gallery-2 {3636 --wp--style--unstable-gallery-gap: var(3637 --wp--style--gallery-gap-default,3638 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em))3639 );3640 gap: var(3641 --wp--style--gallery-gap-default,3642 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em))3643 );3644 }3645 3646 /*# sourceURL=core-block-supports-inline-css */3647 </style>3648 <style id="core-block-supports-duotone-inline-css">3649 .wp-duotone-f6cff4-ffee58-1.wp-block-image img,3650 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder {3651 filter: url(#wp-duotone-f6cff4-ffee58-1);3652 }3653 3655 3654 /*# sourceURL=core-block-supports-duotone-inline-css */3655 </style>3656 3656 <script 3657 3657 src="http://localhost:8000/wp-includes/js/wp-embed.js?ver=6.9-alpha-60093-src" 3658 3658 id="wp-embed-js"
Again, the cascade is the same, with the benefit of FOUC elimination.
@westonruter commented on PR #10288:
7 weeks ago
#18
And here is the diff when before the styles are not loaded on demand, but after they are:
-
.html
old new 43 43 <link 44 44 rel="stylesheet" 45 45 id="wp-block-library-css" 46 href="http://localhost:8000/wp-includes/css/dist/block-library/ style.css?ver=6.9-alpha-60093-src"46 href="http://localhost:8000/wp-includes/css/dist/block-library/common.css?ver=6.9-alpha-60093-src" 47 47 media="all" 48 48 /> 49 49 <link 50 50 rel="stylesheet" 51 id=" wp-block-library-theme-css"52 href="http://localhost:8000/wp-includes/css/ dist/block-library/theme.css?ver=6.9-alpha-60093-src"51 id="classic-theme-styles-css" 52 href="http://localhost:8000/wp-includes/css/classic-themes.css?ver=6.9-alpha-60093-src" 53 53 media="all" 54 54 /> 55 55 <link 56 56 rel="stylesheet" 57 id="classic-theme-styles-css" 58 href="http://localhost:8000/wp-includes/css/classic-themes.css?ver=6.9-alpha-60093-src" 57 id="twentyfourteen-lato-css" 58 href="http://localhost:8000/wp-content/themes/twentyfourteen/fonts/font-lato.css?ver=20230328" 59 media="all" 60 /> 61 <link 62 rel="stylesheet" 63 id="genericons-css" 64 href="http://localhost:8000/wp-content/themes/twentyfourteen/genericons/genericons.css?ver=3.0.3" 65 media="all" 66 /> 67 <link 68 rel="stylesheet" 69 id="twentyfourteen-style-css" 70 href="http://localhost:8000/wp-content/themes/twentyfourteen/style.css?ver=20250715" 71 media="all" 72 /> 73 <link 74 rel="stylesheet" 75 id="twentyfourteen-block-style-css" 76 href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715" 77 media="all" 78 /> 79 <link 80 rel="stylesheet" 81 id="wp-block-image-css" 82 href="http://localhost:8000/wp-includes/blocks/image/style.css?ver=6.9-alpha-60093-src" 83 media="all" 84 /> 85 <link 86 rel="stylesheet" 87 id="wp-block-image-theme-css" 88 href="http://localhost:8000/wp-includes/blocks/image/theme.css?ver=6.9-alpha-60093-src" 89 media="all" 90 /> 91 <link 92 rel="stylesheet" 93 id="wp-block-paragraph-css" 94 href="http://localhost:8000/wp-includes/blocks/paragraph/style.css?ver=6.9-alpha-60093-src" 95 media="all" 96 /> 97 <link 98 rel="stylesheet" 99 id="wp-block-group-css" 100 href="http://localhost:8000/wp-includes/blocks/group/style.css?ver=6.9-alpha-60093-src" 101 media="all" 102 /> 103 <link 104 rel="stylesheet" 105 id="wp-block-group-theme-css" 106 href="http://localhost:8000/wp-includes/blocks/group/theme.css?ver=6.9-alpha-60093-src" 107 media="all" 108 /> 109 <link 110 rel="stylesheet" 111 id="wp-block-pullquote-css" 112 href="http://localhost:8000/wp-includes/blocks/pullquote/style.css?ver=6.9-alpha-60093-src" 113 media="all" 114 /> 115 <link 116 rel="stylesheet" 117 id="wp-block-pullquote-theme-css" 118 href="http://localhost:8000/wp-includes/blocks/pullquote/theme.css?ver=6.9-alpha-60093-src" 119 media="all" 120 /> 121 <link 122 rel="stylesheet" 123 id="wp-block-columns-css" 124 href="http://localhost:8000/wp-includes/blocks/columns/style.css?ver=6.9-alpha-60093-src" 125 media="all" 126 /> 127 <link 128 rel="stylesheet" 129 id="wp-block-cover-css" 130 href="http://localhost:8000/wp-includes/blocks/cover/style.css?ver=6.9-alpha-60093-src" 131 media="all" 132 /> 133 <link 134 rel="stylesheet" 135 id="wp-block-social-links-css" 136 href="http://localhost:8000/wp-includes/blocks/social-links/style.css?ver=6.9-alpha-60093-src" 137 media="all" 138 /> 139 <link 140 rel="stylesheet" 141 id="wp-block-embed-css" 142 href="http://localhost:8000/wp-includes/blocks/embed/style.css?ver=6.9-alpha-60093-src" 143 media="all" 144 /> 145 <link 146 rel="stylesheet" 147 id="wp-block-embed-theme-css" 148 href="http://localhost:8000/wp-includes/blocks/embed/theme.css?ver=6.9-alpha-60093-src" 149 media="all" 150 /> 151 <link 152 rel="stylesheet" 153 id="wp-block-categories-css" 154 href="http://localhost:8000/wp-includes/blocks/categories/style.css?ver=6.9-alpha-60093-src" 155 media="all" 156 /> 157 <link 158 rel="stylesheet" 159 id="wp-block-gallery-css" 160 href="http://localhost:8000/wp-includes/blocks/gallery/style.css?ver=6.9-alpha-60093-src" 161 media="all" 162 /> 163 <link 164 rel="stylesheet" 165 id="wp-block-gallery-theme-css" 166 href="http://localhost:8000/wp-includes/blocks/gallery/theme.css?ver=6.9-alpha-60093-src" 167 media="all" 168 /> 169 <link 170 rel="stylesheet" 171 id="wp-block-search-css" 172 href="http://localhost:8000/wp-includes/blocks/search/style.css?ver=6.9-alpha-60093-src" 173 media="all" 174 /> 175 <link 176 rel="stylesheet" 177 id="wp-block-search-theme-css" 178 href="http://localhost:8000/wp-includes/blocks/search/theme.css?ver=6.9-alpha-60093-src" 179 media="all" 180 /> 181 <link 182 rel="stylesheet" 183 id="wp-block-heading-css" 184 href="http://localhost:8000/wp-includes/blocks/heading/style.css?ver=6.9-alpha-60093-src" 185 media="all" 186 /> 187 <link 188 rel="stylesheet" 189 id="wp-block-latest-posts-css" 190 href="http://localhost:8000/wp-includes/blocks/latest-posts/style.css?ver=6.9-alpha-60093-src" 59 191 media="all" 60 192 /> 193 <link 194 rel="stylesheet" 195 id="wp-block-latest-comments-css" 196 href="http://localhost:8000/wp-includes/blocks/latest-comments/style.css?ver=6.9-alpha-60093-src" 197 media="all" 198 /> 199 <link 200 rel="stylesheet" 201 id="wp-block-archives-css" 202 href="http://localhost:8000/wp-includes/blocks/archives/style.css?ver=6.9-alpha-60093-src" 203 media="all" 204 /> 61 205 <style id="global-styles-inline-css"> 62 206 :root { 63 207 --wp--preset--aspect-ratio--square: 1; … … 376 520 .has-x-large-font-size { 377 521 font-size: var(--wp--preset--font-size--x-large) !important; 378 522 } 379 :where(.wp-block-post-template.is-layout-flex) {380 gap: 1.25em;381 }382 :where(.wp-block-post-template.is-layout-grid) {383 gap: 1.25em;384 }385 523 :where(.wp-block-columns.is-layout-flex) { 386 524 gap: 2em; 387 525 } … … 394 532 } 395 533 /*# sourceURL=global-styles-inline-css */ 396 534 </style> 397 <link 398 rel="stylesheet" 399 id="twentyfourteen-lato-css" 400 href="http://localhost:8000/wp-content/themes/twentyfourteen/fonts/font-lato.css?ver=20230328" 401 media="all" 402 /> 403 <link 404 rel="stylesheet" 405 id="genericons-css" 406 href="http://localhost:8000/wp-content/themes/twentyfourteen/genericons/genericons.css?ver=3.0.3" 407 media="all" 408 /> 409 <link 410 rel="stylesheet" 411 id="twentyfourteen-style-css" 412 href="http://localhost:8000/wp-content/themes/twentyfourteen/style.css?ver=20250715" 413 media="all" 414 /> 415 <link 416 rel="stylesheet" 417 id="twentyfourteen-block-style-css" 418 href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715" 419 media="all" 420 /> 535 <style id="core-block-supports-inline-css"> 536 /** 537 * Core styles: block-supports 538 */ 539 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull { 540 margin-right: calc(var(--wp--preset--spacing--50) * -1); 541 margin-left: calc(var(--wp--preset--spacing--50) * -1); 542 } 543 .wp-container-core-columns-is-layout-9d6595d7 { 544 flex-wrap: nowrap; 545 } 546 .wp-elements-6c33bc3c49cd227fd8339cc6d69a7265 547 a:where(:not(.wp-element-button)) { 548 color: var(--wp--preset--color--base); 549 } 550 .wp-container-core-group-is-layout-45f4d935 > .alignfull { 551 margin-right: calc(var(--wp--preset--spacing--60) * -1); 552 margin-left: calc(var(--wp--preset--spacing--60) * -1); 553 } 554 .wp-container-core-group-is-layout-651e6f64 > .alignfull { 555 margin-right: calc(var(--wp--preset--spacing--30) * -1); 556 margin-left: calc(var(--wp--preset--spacing--30) * -1); 557 } 558 .wp-block-gallery.wp-block-gallery-2 { 559 --wp--style--unstable-gallery-gap: var( 560 --wp--style--gallery-gap-default, 561 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)) 562 ); 563 gap: var( 564 --wp--style--gallery-gap-default, 565 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)) 566 ); 567 } 568 569 /*# sourceURL=core-block-supports-inline-css */ 570 </style> 571 <style id="core-block-supports-duotone-inline-css"> 572 .wp-duotone-f6cff4-ffee58-1.wp-block-image img, 573 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder { 574 filter: url(#wp-duotone-f6cff4-ffee58-1); 575 } 576 577 /*# sourceURL=core-block-supports-duotone-inline-css */ 578 </style> 421 579 <script 422 580 src="http://localhost:8000/wp-includes/js/jquery/jquery.js?ver=3.7.1" 423 581 id="jquery-core-js" … … 3495 3653 </defs> 3496 3654 </svg> 3497 3655 3498 <style id="core-block-supports-inline-css">3499 /**3500 * Core styles: block-supports3501 */3502 .wp-container-core-group-is-layout-1c1b4f74 > .alignfull {3503 margin-right: calc(var(--wp--preset--spacing--50) * -1);3504 margin-left: calc(var(--wp--preset--spacing--50) * -1);3505 }3506 .wp-container-core-columns-is-layout-9d6595d7 {3507 flex-wrap: nowrap;3508 }3509 .wp-elements-6c33bc3c49cd227fd8339cc6d69a72653510 a:where(:not(.wp-element-button)) {3511 color: var(--wp--preset--color--base);3512 }3513 .wp-container-core-group-is-layout-45f4d935 > .alignfull {3514 margin-right: calc(var(--wp--preset--spacing--60) * -1);3515 margin-left: calc(var(--wp--preset--spacing--60) * -1);3516 }3517 .wp-container-core-group-is-layout-651e6f64 > .alignfull {3518 margin-right: calc(var(--wp--preset--spacing--30) * -1);3519 margin-left: calc(var(--wp--preset--spacing--30) * -1);3520 }3521 .wp-block-gallery.wp-block-gallery-2 {3522 --wp--style--unstable-gallery-gap: var(3523 --wp--style--gallery-gap-default,3524 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em))3525 );3526 gap: var(3527 --wp--style--gallery-gap-default,3528 var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em))3529 );3530 }3531 3532 /*# sourceURL=core-block-supports-inline-css */3533 </style>3534 <style id="core-block-supports-duotone-inline-css">3535 .wp-duotone-f6cff4-ffee58-1.wp-block-image img,3536 .wp-duotone-f6cff4-ffee58-1.wp-block-image .components-placeholder {3537 filter: url(#wp-duotone-f6cff4-ffee58-1);3538 }3539 3540 /*# sourceURL=core-block-supports-duotone-inline-css */3541 </style>3542 3656 <script 3543 3657 src="http://localhost:8000/wp-includes/js/wp-embed.js?ver=6.9-alpha-60093-src" 3544 3658 id="wp-embed-js"
Side-by-side view with Diff Checker: https://www.diffchecker.com/tCVBWjnO/
@westonruter commented on PR #10288:
7 weeks ago
#19
In this last diff (https://github.com/WordPress/wordpress-develop/pull/10288#issuecomment-3424538348), I do see that this CSS appears in a different order:
<link rel="stylesheet" id="twentyfourteen-block-style-css" href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715" media="all" />
- Before: It appears _after_
wp-block-library-css. - After: It appears _before_ the individual block-specific stylesheets enqueued instead of
wp-block-library-css.
Difference in the cascade for an IMG in the Image block:
Before | After
@westonruter commented on PR #10288:
7 weeks ago
#20
With many thanks to @dmsnell, there is now a fix for the CSS cascade issue: 61d2fa9.
The issue is that the styles were being inserted _after_ wp_print_styles() finished as opposed to inserting the styles immediately after the position where wp-block-library was printed.
Block styles not on demand | Block styles on demand
This ticket was mentioned in Slack in #core-editor by westonruter. View the logs.
7 weeks ago
This ticket was mentioned in Slack in #core by westonruter. View the logs.
7 weeks ago
#24
follow-up:
↓ 25
@
6 weeks ago
Hi,
we remove the wp-block-library styles from our site:
<?php add_action( 'enqueue_block_assets', function (): void { wp_deregister_style( 'wp-block-library' ); wp_register_style( 'wp-block-library', '' ); } );
Like others:
- https://github.com/search?q=wp_deregister_style%28+%27wp-block-library%27+%29%3B&type=code
- https://github.com/search?q=wp_dequeue_style%28+%27wp-block-library%27+%29&type=code
With WP 6.9-Beta1 we don't get the global-styles-inline-css styles anymore, which breaks our styles.
#25
in reply to:
↑ 24
@
6 weeks ago
Replying to Soean:
Hi,
we remove thewp-block-librarystyles from our site: [...]
With WP 6.9-Beta1 we don't get theglobal-styles-inline-cssstyles anymore, which breaks our styles.
@Soean thanks for that. I had wondered about this and intended to follow up during beta. I'll file new defect ticket and attack a PR with a fix. I'll ping you there when ready.
#26
@
6 weeks ago
- Keywords has-unit-tests added; needs-unit-tests removed
@Soean Can you share more details about how your styles are being enqueued? Are you enqueueing them after wp_head so they are printed at wp_footer?
This ticket was mentioned in PR #10436 on WordPress/wordpress-develop by @westonruter.
5 weeks ago
#29
Trac ticket: https://core.trac.wordpress.org/ticket/64099
#30
@
5 weeks ago
- Resolution fixed deleted
- Status changed from closed to reopened
I'm re-opening this to track the follow-up work being done in PR 10436 to improve hoisted stylesheet ordering.
Also, the change in [61076] to make the wp-block-styles theme support a precondition for loading separate block styles on demand was a mistake. I suggested it erroneously in #64150. It prevented styles from being loaded on demand for Twenty Twenty (see #64166) and Astra, and any other theme that doesn't add wp-block-styles theme support.
@Soean For the the immediate term, for you to continue excluding block styles in your theme, in addition to doing:
<?php add_action( 'enqueue_block_assets', function (): void { wp_deregister_style( 'wp-block-library' ); wp_register_style( 'wp-block-library', '' ); } );
You'll also need to do:
<?php add_action( 'after_setup_theme', function (): void { add_filter( 'should_load_separate_core_block_assets', '__return_false' ); } );
Given how overwhelmingly the wp-block-library styles are not being blocked from being printed (as indeed core doesn't even have an official way to do this), it seems the benefits of ensuring better performance for when wp-block-library outweigh the the benefits of maintaining backwards-compatibility for the minority of sites which try to exclude the block styles from being loaded (as commented above). This said, I'm re-opening this ticket in part because I want to if there may still be an alternative solution to prevent the separate block styles from being enqueued if wp-block-library is nullified.
What follows are the performance benefits of loading the block styles on demand, note in particular the improvements to FCP, LCP, and LCP-TTFB. The regression in TTFB is expected due to the introduction of the output buffer, but since the FCP and LCP are ultimately reduced, the result is a net improvement. The "TTLB" (time to last byte) numbers need further investigation.
Twenty Twenty
Total CSS is reduced from 291 kB down to 184 kB. Coverage report: before vs after.
Web vitals benchmarks over broadband:
| Metric | Before | After | Diff (ms) | Diff (%) |
|---|---|---|---|---|
| FCP (median) | 357.4 | 337 | -20.40 | -5.7% |
| LCP (median) | 365.7 | 345.3 | -20.40 | -5.6% |
| TTFB (median) | 63.9 | 94.9 | +31.00 | +48.5% |
| TTLB (median) | 99.4 | 141.1 | +41.70 | +42.0% |
| LCP-TTFB (median) | 300.5 | 250.4 | -50.10 | -16.7% |
Web vitals benchmarks over Fast 4G:
| Metric | Before | After | Diff (ms) | Diff (%) |
|---|---|---|---|---|
| FCP (median) | 668.6 | 581.7 | -86.90 | -13.0% |
| LCP (median) | 677 | 590 | -87.00 | -12.9% |
| TTFB (median) | 64.8 | 97.3 | +32.50 | +50.2% |
| TTLB (median) | 215 | 229 | +14.00 | +6.5% |
| LCP-TTFB (median) | 611.8 | 487.1 | -124.70 | -20.4% |
Astra
Total CSS is reduced from 271 kB down to 156 kB. Coverage report: before vs after.
Web vitals benchmarks over broadband:
| Metric | Before | After | Diff (ms) | Diff (%) |
|---|---|---|---|---|
| FCP (median) | 355.4 | 259.9 | -95.50 | -26.9% |
| LCP (median) | 355.4 | 259.9 | -95.50 | -26.9% |
| TTFB (median) | 72.6 | 100.9 | +28.30 | +39.0% |
| TTLB (median) | 186.7 | 225.3 | +38.60 | +20.7% |
| LCP-TTFB (median) | 282.7 | 158.5 | -124.20 | -43.9% |
Web vitals benchmarks over Fast 4G:
| Metric | Before | After | Diff (ms) | Diff (%) |
|---|---|---|---|---|
| FCP (median) | 620.7 | 444.7 | -176.00 | -28.4% |
| LCP (median) | 620.7 | 444.7 | -176.00 | -28.4% |
| TTFB (median) | 72.5 | 101.9 | +29.40 | +40.6% |
| TTLB (median) | 277.3 | 282.9 | +5.60 | +2.0% |
| LCP-TTFB (median) | 548.2 | 345.6 | -202.60 | -37.0% |
Benchmarking commands using GoogleChromeLabs/wpp-research:
npm run research -- benchmark-web-vitals --url="http://localhost:8000/sample-page/?enable_plugins=disable-template-enhancement-output-buffer.php&script_debug=0&wp_debug_display=0" --url="http://localhost:8000/sample-page/?enable_plugins=none&script_debug=0&wp_debug_display=0" --network-conditions=broadband --number="$number" --diff --output=md | tee "broadband.md" npm run research -- benchmark-web-vitals --url="http://localhost:8000/sample-page/?enable_plugins=disable-template-enhancement-output-buffer.php&script_debug=0&wp_debug_display=0" --url="http://localhost:8000/sample-page/?enable_plugins=none&script_debug=0&wp_debug_display=0" --network-conditions="Fast 4G" --number="$number" --diff --output=md | tee "fast-4g.md"
This ticket was mentioned in PR #10457 on WordPress/wordpress-develop by @westonruter.
5 weeks ago
#31
See rationale. This reverts part of r61076, the part which added the wp-block-styles theme support check.
Trac ticket: https://core.trac.wordpress.org/ticket/64099
@westonruter commented on PR #10457:
5 weeks ago
#33
Committed in r61122
This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.
5 weeks ago
@westonruter commented on PR #10436:
4 weeks ago
#35
This was a big headache. But I believe all the kinks are now worked out!
#36
@
4 weeks ago
Ready for review: https://github.com/WordPress/wordpress-develop/pull/10436
@peterwilsoncc commented on PR #10436:
4 weeks ago
#37
I've tested this with a helper plugin that includes three functions to run and am seeing some regressions between the 6.8 branch and this one when it comes to de registering or modifying the block CSS.
There's various ways a theme may wish to modify the block styles that are now being replaced with Core's styles.
| Test function | WordPress 6.8 | Feature branch | Result |
|---|---|---|---|
add_dependency_to_block_library | | | ✅ |
deregister_and_replace_blocks_styles | | | ⚠️ |
remove_theme_support_block_styles | | | ⚠️ |
register_custom_block_styles | | | ⚠️ |
@westonruter commented on PR #10436:
4 weeks ago
#38
@peterwilsoncc Thank you for this. After evaluating the error scenarios, they all appear to be the same as is described in my ticket comment. Namely, if a site is explicitly expecting wp-block-library to be present and _not_ the separate block styles, then they need to add this plugin code:
add_filter( 'should_load_separate_core_block_assets', '__return_false' );
This needs to be called out in the dev note for sure.
This ticket was mentioned in Slack in #core by westonruter. View the logs.
4 weeks ago
#42
@
4 weeks ago
The on-demand style printing does not work in situations such as having a Cover block inside a Latest Posts block showing full post content (until after I added a Cover block in a separate widget). It likely can have trouble with other nested blocks too.
It's very late to keep trying to fix this enhancement for 6.9, write a dev note, etc. Could we revert and revisit early for 7.0?
#43
@
4 weeks ago
@sabernhardt As we've been chatting over DM, it looks like this is an existing issue which is already affecting block themes. It has been reported in Gutenberg#69427 where I just added a comment noting that would start to be seen by classic themes in 6.9.
This ticket was mentioned in Slack in #forums by westonruter. View the logs.
4 weeks ago
This ticket was mentioned in Slack in #core-test by awetz583. View the logs.
3 weeks ago
#46
@
3 weeks ago
This isn't a bug, but maybe something for a devnote: After this update, a block needs to return some HTML in order for the CSS styles to load in the front end.
Testing a custom dynamic block on a classic/hybrid theme that didn't have any content in the render.php file resulted in no CSS loading on the page. This makes sense, it's just a change from how this block worked in 6.8
#47
@
3 weeks ago
@awetz583 Thanks for calling that out. This would actually be related to #63676. There is a new filter enqueue_empty_block_content_assets which is specifically introduced to opt-in to enqueueing scripts and styles for blocks that have no content. I'm working on a dev note about it now.
This can now proceed now that #43258 has been fixed via [60936].