Changeset 59814 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 02/12/2025 03:38:09 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r59802 r59814 2851 2851 // Combine selectors with style variation's selector and add to overall style variation declarations. 2852 2852 foreach ( $variation_declarations as $current_selector => $new_declarations ) { 2853 // If current selector includes block classname, remove it but leave the whitespace in. 2854 $shortened_selector = str_replace( $block_metadata['selector'] . ' ', ' ', $current_selector ); 2853 /* 2854 * Clean up any whitespace between comma separated selectors. 2855 * This prevents these spaces breaking compound selectors such as: 2856 * - `.wp-block-list:not(.wp-block-list .wp-block-list)` 2857 * - `.wp-block-image img, .wp-block-image.my-class img` 2858 */ 2859 $clean_current_selector = preg_replace( '/,\s+/', ',', $current_selector ); 2860 $shortened_selector = str_replace( $block_metadata['selector'], '', $clean_current_selector ); 2855 2861 2856 2862 // Prepend the variation selector to the current selector.
Note: See TracChangeset
for help on using the changeset viewer.