Make WordPress Core

Changeset 61251


Ignore:
Timestamp:
11/17/2025 10:47:41 AM (3 months ago)
Author:
jorgefilipecosta
Message:

Fix: Custom font size taking over fit text.

Fixes an issue where if a paragraph/heading had a custom font size and then was conververted to the stretchy variation. The custom font size on the front end was applied instead of fit text.

Developed in: https://github.com/WordPress/wordpress-develop/pull/10517.

Props jorgefilipecosta, mcsf, mrwweb, t-hamano.
Fixes #64254.

Location:
branches/6.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.9

    • Property svn:mergeinfo changed
      /trunk (added)merged: 61246
  • branches/6.9/src/wp-includes/block-supports/typography.php

    r61145 r61251  
    307307 */
    308308function wp_render_typography_support( $block_content, $block ) {
    309     if ( ! empty( $block['attrs']['fitText'] ) && ! is_admin() ) {
     309    if ( ! empty( $block['attrs']['fitText'] ) && $block['attrs']['fitText'] && ! is_admin() ) {
    310310        wp_enqueue_script_module( '@wordpress/block-editor/utils/fit-text-frontend' );
    311311
     
    323323            }
    324324        }
     325        // fitText supersedes any other typography features
     326        return $block_content;
    325327    }
    326328    if ( ! isset( $block['attrs']['style']['typography']['fontSize'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.