Make WordPress Core


Ignore:
Timestamp:
01/09/2024 02:43:48 AM (15 months ago)
Author:
isabel_brison
Message:

Editor: add CSS var parsing for fontSize and fontFamily.

Adds capability to parse CSS custom properties for fontSize and fontFamily in WP_Style_Engine.

Props ramonopoly.
Fixes #59982.

File:
1 edited

Legend:

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

    r56640 r57253  
    216216                ),
    217217                'path'          => array( 'typography', 'fontSize' ),
     218                'css_vars'      => array(
     219                    'font-size' => '--wp--preset--font-size--$slug',
     220                ),
    218221                'classnames'    => array(
    219222                    'has-$slug-font-size' => 'font-size',
     
    223226                'property_keys' => array(
    224227                    'default' => 'font-family',
     228                ),
     229                'css_vars'      => array(
     230                    'font-family' => '--wp--preset--font-family--$slug',
    225231                ),
    226232                'path'          => array( 'typography', 'fontFamily' ),
Note: See TracChangeset for help on using the changeset viewer.