Make WordPress Core


Ignore:
Timestamp:
10/02/2025 11:53:19 PM (8 months ago)
Author:
andrewserong
Message:

Editor: introduce border.radiusSizes support in theme.json.

Adds site front end rendering logic for the border.radiusSizes border radius presets, as well as the required logic in WP_Theme_JSON and the style engine.

Props aaronrobertshaw, youknowriad, ramonopoly, poena, joen, jameskoster, richtabor, asafm7, fabiankaegy
Fixes #63799.

File:
1 edited

Legend:

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

    r60809 r60892  
    127127     *              Updated the 'prevent_override' value for font size presets to use 'typography.defaultFontSizes'
    128128     *              and spacing size presets to use `spacing.defaultSpacingSizes`.
     129     * @since 6.9.0 Added `border.radiusSizes`.
    129130     * @var array
    130131     */
     
    206207            'properties'        => array( 'box-shadow' ),
    207208        ),
     209        array(
     210            'path'              => array( 'border', 'radiusSizes' ),
     211            'prevent_override'  => false,
     212            'use_default_names' => false,
     213            'value_key'         => 'size',
     214            'css_vars'          => '--wp--preset--border-radius--$slug',
     215            'classes'           => array(),
     216            'properties'        => array( 'border-radius' ),
     217        ),
    208218    );
    209219
     
    385395     * @since 6.6.0 Added support for 'dimensions.aspectRatios', 'dimensions.defaultAspectRatios',
    386396     *              'typography.defaultFontSizes', and 'spacing.defaultSpacingSizes'.
     397     * @since 6.9.0 Added support for `border.radiusSizes`.
    387398     * @var array
    388399     */
     
    395406        ),
    396407        'border'                        => array(
    397             'color'  => null,
    398             'radius' => null,
    399             'style'  => null,
    400             'width'  => null,
     408            'color'       => null,
     409            'radius'      => null,
     410            'radiusSizes' => null,
     411            'style'       => null,
     412            'width'       => null,
    401413        ),
    402414        'color'                         => array(
Note: See TracChangeset for help on using the changeset viewer.