Skip to content

Commit 3a660e2

Browse files
committed
fix: bug fix
1 parent e853ebd commit 3a660e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/global-settings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ public function generate_typography_styles( $selector, $styles ) {
790790
if ( isset( $styles['fontSize'] ) ) {
791791
$clamp_desktop_value = $this->clamp_inherited_style( $styles['fontSize'], $inherit_max );
792792
if ( ! empty( $clamp_desktop_value ) ) {
793-
$font_size = $this->create_style( 'font-size', $this->clean_font_size( $clamp_desktop_value . $styles['fontSizeUnit'] ) );
793+
$font_size = $this->create_style( 'font-size', $this->clean_font_size( $clamp_desktop_value, $styles['fontSizeUnit'] ) );
794794
}
795795
}
796796
}
@@ -898,7 +898,7 @@ public function get_font_family( $font_name ) {
898898
* @param {Object} options
899899
*/
900900
public function clamp_inherited_style( $value, $max = 999999, $min = -999999 ) {
901-
if ( isset( $value ) ) {
901+
if ( isset( $value ) && is_numeric( $value ) ) {
902902
$clamped_value = max( $min, min( $max, $value ) );
903903
return $clamped_value !== $value ? $clamped_value : null;
904904
}

0 commit comments

Comments
 (0)