Make WordPress Core


Ignore:
Timestamp:
06/21/2023 05:30:24 AM (20 months ago)
Author:
isabel_brison
Message:

Editor: update layout classnames and specificity.

Adds a compound layout classname and reduces layout spacing rule specificity.

Props ramonopoly, andrewserong, poena.
Fixes #58548.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/layout.php

    r55541 r55956  
    313313 *
    314314 * @since 5.8.0
     315 * @since 6.3.0 Adds compound class to layout wrapper for global spacing styles.
    315316 * @access private
    316317 *
     
    474475        }
    475476    }
     477
     478    // Add combined layout and block classname for global styles to hook onto.
     479    $block_name    = explode( '/', $block['blockName'] );
     480    $class_names[] = 'wp-block-' . end( $block_name ) . '-' . $layout_classname;
    476481
    477482    $content_with_outer_classnames = '';
Note: See TracChangeset for help on using the changeset viewer.