Changeset 55956 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 06/21/2023 05:30:24 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r55950 r55956 1247 1247 * 1248 1248 * @since 6.1.0 1249 * @since 6.3.0 Reduced specificity for layout margin rules. 1249 1250 * 1250 1251 * @param array $block_metadata Metadata about the block to get styles for. … … 1343 1344 ); 1344 1345 } else { 1345 $format = static::ROOT_BLOCK_SELECTOR === $selector ? ' %s .%s%s' : '%s.%s%s';1346 $format = static::ROOT_BLOCK_SELECTOR === $selector ? ':where(%s .%s) %s' : '%s-%s%s'; 1346 1347 $layout_selector = sprintf( 1347 1348 $format, … … 2561 2562 if ( $has_block_gap_support ) { 2562 2563 $block_gap_value = static::get_property_value( $this->theme_json, array( 'styles', 'spacing', 'blockGap' ) ); 2563 $css .= '.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }'; 2564 $css .= ".wp-site-blocks > * + * { margin-block-start: $block_gap_value; }"; 2564 $css .= ":where(.wp-site-blocks) > * { margin-block-start: $block_gap_value; margin-block-end: 0; }"; 2565 $css .= ':where(.wp-site-blocks) > :first-child:first-child { margin-block-start: 0; }'; 2566 $css .= ':where(.wp-site-blocks) > :last-child:last-child { margin-block-end: 0; }'; 2565 2567 2566 2568 // For backwards compatibility, ensure the legacy block gap CSS variable is still available.
Note: See TracChangeset
for help on using the changeset viewer.