Make WordPress Core


Ignore:
Timestamp:
01/31/2024 02:52:25 AM (15 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/tests/phpunit/tests/style-engine/styleEngine.php

    r57254 r57491  
    185185            ),
    186186
     187            'inline_valid_aspect_ratio_style'              => array(
     188                'block_styles'    => array(
     189                    'dimensions' => array(
     190                        'aspectRatio' => '4/3',
     191                        'minHeight'   => 'unset',
     192                    ),
     193                ),
     194                'options'         => null,
     195                'expected_output' => array(
     196                    'css'          => 'aspect-ratio:4/3;min-height:unset;',
     197                    'declarations' => array(
     198                        'aspect-ratio' => '4/3',
     199                        'min-height'   => 'unset',
     200                    ),
     201                    'classnames'   => 'has-aspect-ratio',
     202                ),
     203            ),
     204
    187205            'inline_valid_shadow_style'                    => array(
    188206                'block_styles'    => array(
Note: See TracChangeset for help on using the changeset viewer.