Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:59:44 PM (13 months ago)
Author:
davidbaumwald
Message:

Editor: Introduce sticky position block support.

In the Gutenberg plugin, a position block support feature was introduced last year, that allows a Group block to be set to a "sticky" position, meaning that when the page scrolls, the block will stick to the top of the window.

This change merges the "sticky" position feature for blocks introduced in Gutenberg 15.0.

Props andrewserong, flixos90, mukesh27.
Fixes #57618.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r55255 r55285  
    305305     * @since 6.0.0 Added `color.defaultDuotone`.
    306306     * @since 6.1.0 Added `layout.definitions` and `useRootPaddingAwareAlignments`.
    307      * @since 6.2.0 Added `dimensions.minHeight`, 'shadow.presets', and 'shadow.defaultPresets'.
     307     * @since 6.2.0 Added `dimensions.minHeight`, 'shadow.presets', 'shadow.defaultPresets',
     308     *              `position.fixed` and `position.sticky`.
    308309     * @var array
    309310     */
     
    339340            'definitions' => null,
    340341            'wideSize'    => null,
     342        ),
     343        'position'                      => array(
     344            'fixed'  => null,
     345            'sticky' => null,
    341346        ),
    342347        'spacing'                       => array(
     
    514519     *
    515520     * @since 6.0.0
    516      * @since 6.2.0 Added `dimensions.minHeight`.
     521     * @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`.
    517522     * @var array
    518523     */
     
    524529        array( 'color', 'link' ),
    525530        array( 'dimensions', 'minHeight' ),
     531        array( 'position', 'sticky' ),
    526532        array( 'spacing', 'blockGap' ),
    527533        array( 'spacing', 'margin' ),
Note: See TracChangeset for help on using the changeset viewer.