[wp-trac] [WordPress Trac] #63922: FontSizePicker incorrectly measures units for selecting elements
WordPress Trac
noreply at wordpress.org
Wed Sep 3 19:07:48 UTC 2025
#63922: FontSizePicker incorrectly measures units for selecting elements
---------------------------+-----------------------------
Reporter: blackstar1991 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.8.2
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
I see that WordPress show incorrect information of units of
[https://wordpress.github.io/gutenberg/?path=/docs/components-
fontsizepicker--docs FontSizePicker] if user choose default to the labels
'S / M / L / XL / XXL'.
Example my component
{{{
<FontSizePicker
__next40pxDefaultSize
fontSizes={[
{
name: 'Small',
size: 12,
slug: 'small'
},
{
name: 'Normal',
size: 16,
slug: 'normal'
},
{
name: 'Big',
size: 26,
slug: 'big'
}
]}
value={
titleFontSize? parseFloat( titleFontSize ): undefined
}
onChange={ ( newSize ) => {
if ( newSize === undefined ) {
setAttributes( {
titleFontSize: '16',
titleFontUnit: 'px',
} );
return;
}
setAttributes( {
titleFontSize: String( newSize ),
titleFontUnit: 'px',
} );
} }
withSlider />
}}}
I saw this. ->
[[Image(https://i.ibb.co/mCPjTVYX/WP-BUG.jpg)]]
This component does not correctly indicate the units of measurement when
switching between different states. Ideally it should show the font size
in "px" but in fact it displays the value in "rem", but writes that it is
"px"
[[Image(https://i.ibb.co/5ht7qK6x/elementor-test-Google-
Chrome-2025-09-03-22-04-47.jpg)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63922>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list