Skip to content

Editing rem border-radius values triggers unintended px conversion, preventing 0.5rem input #73291

@sato-jp

Description

@sato-jp

Description

I initially discovered this issue in WordPress Playground.
After further testing, I confirmed that the same problem also occurs in a beta WordPress environment installed on my own server.

The issue was first noticed when I attempted a very common operation:
changing a border radius value from 1rem to 0.5rem.
During this process, the bug became immediately apparent because the editor does not allow the value to be changed smoothly.

Since border radius is an attribute that can be applied to many different blocks,
I believe this behavior can affect a wide range of users and may cause significant frustration during design work.

I found a bug related to editing the border-radius value in Group and Paragraph blocks.
This issue occurs in both Safari (macOS) and Chromium-based browsers (Brave).

Step-by-step reproduction instructions

  1. Open WordPress.
  2. Create a new post.
  3. Insert a Group block or Paragraph block.
  4. Set a border radius value such as 1rem.
  5. Try to change the value to 0.5rem by deleting the “1” with Backspace.

Screenshots, screen recording, code snippet

  • As soon as the first digit is deleted, the unit automatically changes from rem to px.
  • The intermediate value becomes 0.5px, which is not a valid CSS value.
  • WordPress then automatically corrects it to 1px.
  • If you manually switch the unit back to rem and try again, the same behavior happens repeatedly.
  • As a result, you cannot enter 0.5rem at all.
WordPress.Playground.webm

Environment info

OS

  • macOS

Browser

  • Safari
  • Brave (Chromium base)

WordPress

  • WordPress 6.9 RC1 (No Plugin)
  • Language: English or Japanese
  • Theme: Twenty Twenty-Five 1.3

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

Labels

[Package] Block editor/packages/block-editor[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions