Make WordPress Core

Opened 7 weeks ago

Closed 4 weeks ago

Last modified 3 weeks ago

#64099 closed enhancement (fixed)

Load block styles on demand in classic themes via template enhancement output buffer

Reported by: westonruter's profile westonruter Owned by: westonruter's profile westonruter
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 westonruter)

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 demonstration plugin.

See performance impacts in these PR comments:

Attachments (4)

coverage-astra-before.png (166.2 KB) - added by westonruter 5 weeks ago.
CSS code coverage for Astra without on demand block style loading
coverage-astra-after.png (184.1 KB) - added by westonruter 5 weeks ago.
CSS code coverage for Astra with on demand block style loading
coverage-twentytwenty-before.png (242.1 KB) - added by westonruter 5 weeks ago.
CSS code coverage for Twenty Twenty without on demand block style loading
coverage-twentytwenty-after.png (406.3 KB) - added by westonruter 5 weeks ago.
CSS code coverage for Twenty Twenty with on demand block style loading

Download all attachments as: .zip

Change History (53)

Image

This ticket was mentioned in Slack in #core by westonruter. View the logs.


7 weeks ago

#2 Image @westonruter
7 weeks ago

  • Description modified (diff)

#3 Image @westonruter
7 weeks ago

  • Type changed from defect (bug) to enhancement

Image

This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.


7 weeks ago

#5 Image @westonruter
7 weeks ago

This can now proceed now that #43258 has been fixed via [60936].

Image

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

#7 Image @westonruter
7 weeks ago

  • Keywords needs-unit-tests added

Image

@westonruter commented on PR #10288:


7 weeks ago
#8

We also need to add unit tests.

Image

@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.

Image

@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?

#11 Image @westonruter
7 weeks ago

  • Owner set to westonruter
  • Status changed from new to accepted

Image

@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  
    4747    <link
    4848      rel="stylesheet"
    4949      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"
    5151      media="all"
    5252    />
    5353    <link
    5454      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     <link
    60       rel="stylesheet"
    6155      id="classic-theme-styles-css"
    6256      href="http://localhost:8000/wp-includes/css/classic-themes.min.css?ver=6.9-alpha-60093-src"
    6357      media="all"
     
    8478      }
    8579      /*# sourceURL=twenty-twenty-one-custom-color-overrides-inline-css */
    8680    </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    />
    87171    <style id="global-styles-inline-css">
    88172      :root {
    89173        --wp--preset--aspect-ratio--square: 1;
     
    451535      .has-x-large-font-size {
    452536        font-size: var(--wp--preset--font-size--x-large) !important;
    453537      }
    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);
    456544      }
    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);
    469551      }
    470       /*# sourceURL=global-styles-inline-css */
     552      /*# sourceURL=core-block-supports-duotone-inline-css */
    471553    </style>
    472     <link
    473       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     <link
    479       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     <link
    485       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     />
    490554    <script id="twenty-twenty-one-ie11-polyfills-js-after">
    491555      (Element.prototype.matches &&
    492556        Element.prototype.closest &&
     
    12601324      }
    12611325      //# sourceURL=twentytwentyone_add_ie_class
    12621326    </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>
    12771327    <script
    12781328      src="http://localhost:8000/wp-content/themes/twentytwentyone/assets/js/dark-mode-toggler.js?ver=1.0.0"
    12791329      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.

Image

@westonruter commented on PR #10288:


7 weeks ago
#13

I ran CSS coverage in Chrome DevTools in Twenty Twenty-One on the Sample Page.

### Before

https://github.com/user-attachments/assets/c873ed87-587e-4a0e-a7f7-6244aba42f79

### After

https://github.com/user-attachments/assets/78efa2e2-8468-431c-814c-cb31b916cf7a

So this cuts off 105 kB of CSS! That's a one-third reduction.

Image

@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:

## Before
https://github.com/user-attachments/assets/0ac23703-c91a-4049-a527-d4104f8b011d

## After
https://github.com/user-attachments/assets/8fd5e23d-1db7-4751-8211-3072f83f0c44

Image

@westonruter commented on PR #10288:


7 weeks ago
#15

I'll commit this in the next hour.

Image

@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  
    418418      href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715"
    419419      media="all"
    420420    />
     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>
    421465    <script
    422466      src="http://localhost:8000/wp-includes/js/jquery/jquery.js?ver=3.7.1"
    423467      id="jquery-core-js"
     
    34943538        </filter>
    34953539      </defs>
    34963540    </svg>
    3497 
    3498     <style id="core-block-supports-inline-css">
    3499       /**
    3500  * Core styles: block-supports
    3501  */
    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-6c33bc3c49cd227fd8339cc6d69a7265
    3510         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       }
    35313541
    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>
    35423542    <script
    35433543      src="http://localhost:8000/wp-includes/js/wp-embed.js?ver=6.9-alpha-60093-src"
    35443544      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.

Image

@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  
    7676      href="http://localhost:8000/wp-content/themes/twentyfourteen/css/blocks.css?ver=20250715"
    7777      media="all"
    7878    />
     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>
    79579    <script
    80580      src="http://localhost:8000/wp-includes/js/jquery/jquery.js?ver=3.7.1"
    81581      id="jquery-core-js"
     
    31523652        </filter>
    31533653      </defs>
    31543654    </svg>
    3155 
    3156     <link
    3157       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     <link
    3163       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     <link
    3169       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     <link
    3175       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     <link
    3181       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     <link
    3187       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     <link
    3193       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     <link
    3199       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     <link
    3205       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     <link
    3211       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     <link
    3217       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     <link
    3223       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     <link
    3229       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     <link
    3235       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     <link
    3241       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     <link
    3247       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     <link
    3253       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     <link
    3259       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     <link
    3265       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     <link
    3271       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     <link
    3277       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-orange
    3480         ) !important;
    3481       }
    3482       .has-luminous-vivid-amber-background-color {
    3483         background-color: var(
    3484           --wp--preset--color--luminous-vivid-amber
    3485         ) !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-orange
    3520         ) !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-purple
    3543         ) !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-cyan
    3548         ) !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-orange
    3553         ) !important;
    3554       }
    3555       .has-luminous-vivid-orange-to-vivid-red-gradient-background {
    3556         background: var(
    3557           --wp--preset--gradient--luminous-vivid-orange-to-vivid-red
    3558         ) !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-gray
    3563         ) !important;
    3564       }
    3565       .has-cool-to-warm-spectrum-gradient-background {
    3566         background: var(
    3567           --wp--preset--gradient--cool-to-warm-spectrum
    3568         ) !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-supports
    3615  */
    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-6c33bc3c49cd227fd8339cc6d69a7265
    3624         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       }
    36533655
    3654       /*# sourceURL=core-block-supports-duotone-inline-css */
    3655     </style>
    36563656    <script
    36573657      src="http://localhost:8000/wp-includes/js/wp-embed.js?ver=6.9-alpha-60093-src"
    36583658      id="wp-embed-js"

Again, the cascade is the same, with the benefit of FOUC elimination.

Image

@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  
    4343    <link
    4444      rel="stylesheet"
    4545      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"
    4747      media="all"
    4848    />
    4949    <link
    5050      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"
    5353      media="all"
    5454    />
    5555    <link
    5656      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"
    59191      media="all"
    60192    />
     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    />
    61205    <style id="global-styles-inline-css">
    62206      :root {
    63207        --wp--preset--aspect-ratio--square: 1;
     
    376520      .has-x-large-font-size {
    377521        font-size: var(--wp--preset--font-size--x-large) !important;
    378522      }
    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       }
    385523      :where(.wp-block-columns.is-layout-flex) {
    386524        gap: 2em;
    387525      }
     
    394532      }
    395533      /*# sourceURL=global-styles-inline-css */
    396534    </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>
    421579    <script
    422580      src="http://localhost:8000/wp-includes/js/jquery/jquery.js?ver=3.7.1"
    423581      id="jquery-core-js"
     
    34953653      </defs>
    34963654    </svg>
    34973655
    3498     <style id="core-block-supports-inline-css">
    3499       /**
    3500  * Core styles: block-supports
    3501  */
    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-6c33bc3c49cd227fd8339cc6d69a7265
    3510         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>
    35423656    <script
    35433657      src="http://localhost:8000/wp-includes/js/wp-embed.js?ver=6.9-alpha-60093-src"
    35443658      id="wp-embed-js"

Side-by-side view with Diff Checker: https://www.diffchecker.com/tCVBWjnO/

Image

@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

--

https://github.com/user-attachments/assets/d454b56c-b582-4671-a15f-ad2f19458a4d | https://github.com/user-attachments/assets/3ebb07af-7b70-41f6-87d5-5a4b25f05ae2

Image

@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

--

https://github.com/user-attachments/assets/0deb9416-8120-44c4-9793-85ee51fb2932 | https://github.com/user-attachments/assets/db88f8ed-8662-41bf-8969-813d151afa06

#21 Image @westonruter
7 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 61008:

Script Loader: Load block styles on demand in classic themes via the template enhancement output buffer.

  • This applies in classic themes when a site has not opted out of the template enhancement buffer by filtering wp_should_output_buffer_template_for_enhancement off.
  • Both should_load_separate_core_block_assets and should_load_block_assets_on_demand are filtered on, as otherwise they are only enabled by default in block themes.
  • Any style enqueued after wp_head and printed via print_late_styles() will get hoisted up to be inserted right after the wp-block-library inline style in the HEAD.
  • The result is a >10% benchmarked improvement in LCP for core classic themes due to a ~100KB reduction in the amount of CSS unconditionally being served with every page load.

Developed in https://github.com/WordPress/wordpress-develop/pull/10288

Follow-up to [60936].

Props sjapaget, westonruter, peterwilsoncc, dmsnell, mindctrl.
See #43258.
Fixes #64099.

Image

This ticket was mentioned in Slack in #core-editor by westonruter. View the logs.


7 weeks ago

Image

This ticket was mentioned in Slack in #core by westonruter. View the logs.


7 weeks ago

#24 follow-up: Image @Soean
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:

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 Image @westonruter
6 weeks ago

Replying to Soean:

Hi,
we remove the wp-block-library styles from our site: [...]
With WP 6.9-Beta1 we don't get the global-styles-inline-css styles 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 Image @westonruter
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?

#27 Image @westonruter
6 weeks ago

@Soean I've opened #64150 to address this issue. Let's continue discussing there.

#28 Image @westonruter
6 weeks ago

In 61076:

Script Loader: Fall back to hoisting late-printed styles to end of HEAD if wp-block-library is not enqueued.

When the wp-block-library stylesheet is not enqueued, there will be no associated inline style present. This inline style normally contains the placeholder CSS comment for the HTML Tag Processor to identify the token after which the late-printed styles should be inserted. However, when the wp-block-library stylesheet is not enqueued (such as in themes which do not use blocks), or else the inline style is not printed for whatever reason, this adds a fallback to insert the late-printed styles immediately before </head>. This ensures that late-printed styles will always get hoisted.

Developed in https://github.com/WordPress/wordpress-develop/pull/10417

Follow-up to [61008].

Props westonruter, peterwilsoncc, Soean.
See #64099, #43258.
Fixes #64150.

Image @westonruter
5 weeks ago

CSS code coverage for Astra without on demand block style loading

Image @westonruter
5 weeks ago

CSS code coverage for Astra with on demand block style loading

Image @westonruter
5 weeks ago

CSS code coverage for Twenty Twenty without on demand block style loading

Image @westonruter
5 weeks ago

CSS code coverage for Twenty Twenty with on demand block style loading

#30 Image @westonruter
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"
Last edited 5 weeks ago by westonruter (previous) (diff)

Image

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

#32 Image @westonruter
5 weeks ago

In 61122:

Script Loader: Load block styles on demand in classic themes even when wp-block-styles support is absent.

This reverts part of [61076] which made wp-block-styles theme support a precondition for opting in to should_load_separate_core_block_assets and should_load_block_assets_on_demand. This meant that the Twenty Twenty theme (and other themes without this support declared) would not benefit from on-demand block style loading. Nevertheless, even though such themes were not getting block styles loaded on demand, the wp_load_classic_theme_block_styles_on_demand() function was proceeding to opt in to the output buffer for hoisting late-printed styles, even though it was unlikely there would then be any. This meant the template enhancement output buffer was being opened for no reason.

Enabling on-demand block style loading is measured to improve FCP and LCP in Twenty Twenty, for example a ~13% improvement over a Fast 4G connection when loading the Sample Page.

Developed in https://github.com/WordPress/wordpress-develop/pull/10457

Follow-up to [61008], [61076], [60936].

Props westonruter.
See #64099, #64150, #64166, #43258.

Image

@westonruter commented on PR #10457:


5 weeks ago
#33

Committed in r61122

Image

This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.


5 weeks ago

Image

@westonruter commented on PR #10436:


4 weeks ago
#35

This was a big headache. But I believe all the kinks are now worked out!

Image

@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 https://github.com/user-attachments/assets/117fd34b-4437-4b64-a3ab-1a0c67fb992e https://github.com/user-attachments/assets/f1f2f526-6ee6-4ff3-9f82-ce4ea512c3bf
deregister_and_replace_blocks_styles https://github.com/user-attachments/assets/ee0b8ca5-b2b4-4560-a936-b29cf80b05a1 https://github.com/user-attachments/assets/5e53d621-7956-47cb-8e51-53f31677acb9 ⚠️
remove_theme_support_block_styles https://github.com/user-attachments/assets/3bb6e306-73b6-48c4-bf76-012d87d7b4c4 https://github.com/user-attachments/assets/4166874e-7588-4265-9938-20f939a430da ⚠️
register_custom_block_styles https://github.com/user-attachments/assets/7639be12-9bc8-4de7-9c6a-fc57782ff40a https://github.com/user-attachments/assets/6d76a959-e298-497e-b757-7dd452e53297 ⚠️

Image

@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.

#39 Image @westonruter
4 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 61174:

Script Loader: Improve hoisted stylesheet ordering (in classic themes) to preserve CSS cascade.

This ensures that on-demand block styles are inserted right after the wp-block-library inline style whereas other stylesheets not related to blocks are appended to the end of the HEAD. This helps ensure the expected cascade is preserved. If no wp-block-library inline style is present, then all styles get appended to the HEAD regardless.

The handling of the CSS placeholder comment added to the wp-block-library inline style is also improved. It is now inserted later to ensure the inline style is printed. Additionally, when the CSS placeholder comment is removed from the wp-block-library inline style, the entire STYLE tag is now removed if there are no styles left (aside from the sourceURL comment).

Lastly, the use of the HTML Tag Processor is significantly improved to leverage WP_HTML_Text_Replacement.

Developed in https://github.com/WordPress/wordpress-develop/pull/10436

Follow-up to [61008].

Props westonruter, peterwilsoncc, dmsnell.
Fixes #64099.

#40 Image @westonruter
4 weeks ago

  • Keywords needs-dev-note added

Image

This ticket was mentioned in Slack in #core by westonruter. View the logs.


4 weeks ago

#42 Image @sabernhardt
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?

Last edited 4 weeks ago by sabernhardt (previous) (diff)

#43 Image @westonruter
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.

Image

This ticket was mentioned in Slack in #forums by westonruter. View the logs.


4 weeks ago

Image

This ticket was mentioned in Slack in #core-test by awetz583. View the logs.


3 weeks ago

#46 Image @awetz583
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 Image @westonruter
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.

Image

This ticket was mentioned in Slack in #core-test by westonruter. View the logs.


3 weeks ago

Note: See TracTickets for help on using tickets.