From 6e67ad17012b29a4d313d01825abce29beb82a00 Mon Sep 17 00:00:00 2001 From: isabel_brison Date: Tue, 9 Jan 2024 02:45:16 +0000 Subject: [PATCH] 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 --- wp-includes/style-engine/class-wp-style-engine.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-includes/style-engine/class-wp-style-engine.php b/wp-includes/style-engine/class-wp-style-engine.php index 121bac2d92..12a6ea8441 100644 --- a/wp-includes/style-engine/class-wp-style-engine.php +++ b/wp-includes/style-engine/class-wp-style-engine.php @@ -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', diff --git a/wp-includes/version.php b/wp-includes/version.php index af21c2ff01..e34e400a4b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.