Make WordPress Core


Ignore:
Timestamp:
07/30/2025 04:22:38 AM (4 months ago)
Author:
westonruter
Message:

Customize: Enable Customizer live previews of Custom CSS in Block Themes.

In a Block Theme, the Custom CSS from the Customizer is inserted into the global styles, before the global style's Custom CSS. In order to update the Customizer's Custom CSS inside of the global styles, milestone CSS comments are added in the preview so that the live preview logic can do the replacement.

Follow-up to [55192], [58703].
See #57536, #61395.

Props westonruter, wildworks, peterwilsoncc, rollybueno, SirLouen, poojapadamad, rafiq91, audrasjb.
Fixes #63589.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r60414 r60522  
    21622162            ),
    21632163            'theme'             => array(
    2164                 'stylesheet' => $this->get_stylesheet(),
    2165                 'active'     => $this->is_theme_active(),
     2164                'stylesheet'   => $this->get_stylesheet(),
     2165                'active'       => $this->is_theme_active(),
     2166                'isBlockTheme' => wp_is_block_theme(),
    21662167            ),
    21672168            'url'               => array(
Note: See TracChangeset for help on using the changeset viewer.