[wp-trac] [WordPress Trac] #64698: Editor: @wordpress/theme style enqueue missing

WordPress Trac noreply at wordpress.org
Mon Feb 23 08:08:45 UTC 2026


#64698: Editor: @wordpress/theme style enqueue missing
--------------------------+--------------------
 Reporter:  wildworks     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  7.0
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+--------------------
 From what I've researched, the DataView in the site editor has some
 layouts based on new design tokens from the `@wordpress/theme` package.
 For example, the new `Stack` component applies gaps using the `--wpds-
 dimension-gap-{size}` CSS variable. However, this CSS variable itself has
 not been enqueued, causing the layout to break.

 If it is intended that UIs based on this new design token be exposed to WP
 7.0, we will need to add `wp-theme` to  [https://github.com/WordPress
 /wordpress-develop/blob/fdafcd3cdcddf55a359a5a0eb98769471825989b/src/wp-
 includes/script-loader.php#L1757 $package_styles] in order to enqueue
 these CSS variables.

 For example, making the following changes will solve the problem:

 {{{#!diff
 diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-
 loader.php
 index f9ea36720b..bde5e70a4e 100644
 --- a/src/wp-includes/script-loader.php
 +++ b/src/wp-includes/script-loader.php
 @@ -1776,6 +1776,7 @@ function wp_default_styles( $styles ) {
                         'wp-reusable-blocks',
                         'wp-patterns',
                         'wp-preferences',
 +                       'wp-theme',
                 ),
                 'format-library'       => array(),
                 'list-reusable-blocks' => array( 'wp-components' ),
 @@ -1783,6 +1784,7 @@ function wp_default_styles( $styles ) {
                 'patterns'             => array( 'wp-components' ),
                 'preferences'          => array( 'wp-components' ),
                 'nux'                  => array( 'wp-components' ),
 +               'theme'                => array(),
                 'widgets'              => array(
                         'wp-components',
                 ),
 @@ -1885,6 +1887,7 @@ function wp_default_styles( $styles ) {
                 'wp-reusable-blocks',
                 'wp-patterns',
                 'wp-nux',
 +               'wp-theme',
                 'wp-widgets',
                 // Deprecated CSS.
                 'deprecated-media',
 }}}

 cc  @0mirka00, @aduth, @mciampini

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64698>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list