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.

Built from https://develop.svn.wordpress.org/trunk@57253


git-svn-id: http://core.svn.wordpress.org/trunk@56759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
isabel_brison 2024-01-09 02:45:16 +00:00
parent c59c7d90c4
commit 6e67ad1701
2 changed files with 7 additions and 1 deletions

View File

@ -215,6 +215,9 @@ final class WP_Style_Engine {
'default' => 'font-size',
),
'path' => array( 'typography', 'fontSize' ),
'css_vars' => array(
'font-size' => '--wp--preset--font-size--$slug',
),
'classnames' => array(
'has-$slug-font-size' => 'font-size',
),
@ -223,6 +226,9 @@ final class WP_Style_Engine {
'property_keys' => array(
'default' => 'font-family',
),
'css_vars' => array(
'font-family' => '--wp--preset--font-family--$slug',
),
'path' => array( 'typography', 'fontFamily' ),
'classnames' => array(
'has-$slug-font-family' => 'font-family',

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57252';
$wp_version = '6.5-alpha-57253';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.