Make WordPress Core


Ignore:
Timestamp:
01/31/2024 02:52:25 AM (17 months ago)
Author:
isabel_brison
Message:

Editor: introduce dimensions.aspectRatio block support.

Adds front end rendering logic for the dimensions.aspectRatio block support as well as the required logic in WP_Theme_JSON and the style engine.

Props andrewserong.
Fixes #60365.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/style-engine/class-wp-style-engine.php

    r57254 r57491  
    2424 * @since 6.3.0 Added support for text-columns.
    2525 * @since 6.4.0 Added support for background.backgroundImage.
    26  * @since 6.5.0 Added support for background.backgroundPosition and background.backgroundRepeat.
     26 * @since 6.5.0 Added support for background.backgroundPosition,
     27 *              background.backgroundRepeat and dimensions.aspectRatio.
    2728 */
    2829#[AllowDynamicProperties]
     
    191192        ),
    192193        'dimensions' => array(
    193             'minHeight' => array(
     194            'aspectRatio' => array(
     195                'property_keys' => array(
     196                    'default' => 'aspect-ratio',
     197                ),
     198                'path'          => array( 'dimensions', 'aspectRatio' ),
     199                'classnames'    => array(
     200                    'has-aspect-ratio' => true,
     201                ),
     202            ),
     203            'minHeight'   => array(
    194204                'property_keys' => array(
    195205                    'default' => 'min-height',
Note: See TracChangeset for help on using the changeset viewer.