| @@ -143,9 +143,9 @@ | ||
| 143 | 143 | private function props_to_css_string( array $props ): string { |
| 144 | 144 | $schema = Style_Schema::get(); |
| 145 | 145 | |
| 146 | 146 | return Collection::make( Render_Props_Resolver::for_styles()->resolve( $schema, $props ) ) |
| 147 | - ->filter() | |
| 147 | + ->filter( fn( $value ) => $this->is_renderable_value( $value ) ) | |
| 148 | 148 | ->map( function ( $value, $prop ) use ( $props, $schema ) { |
| 149 | 149 | $this->maybe_enqueue_font( $schema, $prop, $props[ $prop ] ?? null ); |
| 150 | 150 | |
| 151 | 151 | return $prop . ':' . $value . ';'; |
| @@ -150,8 +150,12 @@ | ||
| 150 | 150 | |
| 151 | 151 | return $prop . ':' . $value . ';'; |
| 152 | 152 | } ) |
| 153 | 153 | ->implode( '' ); |
| 154 | + } | |
| 155 | + | |
| 156 | + private function is_renderable_value( $value ): bool { | |
| 157 | + return is_numeric( $value ) || ! empty( $value ); | |
| 154 | 158 | } |
| 155 | 159 | |
| 156 | 160 | private function maybe_enqueue_font( array $schema, string $prop_key, $prop_value ): void { |
| 157 | 161 | if ( ! $this->on_font_enqueue || ! is_array( $prop_value ) || empty( $prop_value['value'] ) ) { |