From f74f21f1000d5b38556cd566084ccb326ac82b09 Mon Sep 17 00:00:00 2001 From: ramonjd Date: Tue, 1 Nov 2022 15:41:48 +1100 Subject: [PATCH] Add config slot for minFontSize --- lib/block-supports/typography.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-supports/typography.php b/lib/block-supports/typography.php index ac9412c65a3fe0..56f2f47e301475 100644 --- a/lib/block-supports/typography.php +++ b/lib/block-supports/typography.php @@ -464,7 +464,7 @@ function gutenberg_get_typography_font_size_value( $preset, $should_use_fluid_ty $default_minimum_viewport_width = isset( $fluid_settings['minViewPortWidth'] ) ? $fluid_settings['minViewPortWidth'] : '768px'; $default_minimum_font_size_factor = isset( $fluid_settings['minFontSizeFactor'] ) && is_numeric( $fluid_settings['minFontSizeFactor'] ) ? $fluid_settings['minFontSizeFactor'] : 0.75; $default_scale_factor = isset( $fluid_settings['scaleFactor'] ) && is_numeric( $fluid_settings['scaleFactor'] ) ? $fluid_settings['scaleFactor'] : 1; - $default_minimum_font_size_limit = '14px'; + $global_minimum_font_size = isset( $fluid_settings['minFontSize'] ) && is_numeric( $fluid_settings['minFontSize'] ) ? $fluid_settings['minFontSize'] : '14px'; // Font sizes. $fluid_font_size_settings = isset( $preset['fluid'] ) ? $preset['fluid'] : null; @@ -488,7 +488,7 @@ function gutenberg_get_typography_font_size_value( $preset, $should_use_fluid_ty // Parses the minimum font size limit, so we can perform checks using it. $minimum_font_size_limit = gutenberg_get_typography_value_and_unit( - $default_minimum_font_size_limit, + $global_minimum_font_size, array( 'coerce_to' => $preferred_size['unit'], )