Make WordPress Core


Ignore:
Timestamp:
06/09/2026 04:25:45 AM (3 months ago)
Author:
isabel_brison
Message:

Editor: add support for layout responsive styles.

Adds support for setting responsive layout, block spacing and child layout styles.

Props isabel_brison, ramonopoly, audrasjb, desrosj, sabernhardt.
Fixes #65164.

File:
1 edited

Legend:

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

    r62453 r62478  
    4949 */
    5050function wp_normalize_state_style_for_css_output( $style ) {
    51         return wp_normalize_state_preset_vars( $style );
     51        // Layout is processed separately by wp_render_layout_support_flag(), so we remove it before declaration generation.
     52        unset( $style['layout'] );
     53        $style = wp_normalize_state_preset_vars( $style );
     54        return $style;
    5255}
    5356
     
    445448         * State declarations need !important to apply reliably over inline styles and
    446449         * preset utility classes such as .has-accent-3-background-color.
     450         *
     451         * Layout-driven state styles (responsive layout, blockGap, child layout) are
     452         * handled by wp_render_layout_support_flag() so they share a selector with
     453         * the base layout and target the correct (inner) wrapper element.
    447454         */
    448455        $style_rules = array();
Note: See TracChangeset for help on using the changeset viewer.