Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border Radius: Invalid styles when unit is change without supplying value #42354

Closed
aaronrobertshaw opened this issue Jul 12, 2022 · 0 comments · Fixed by #42409
Closed

Border Radius: Invalid styles when unit is change without supplying value #42354

aaronrobertshaw opened this issue Jul 12, 2022 · 0 comments · Fixed by #42409
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended

Comments

@aaronrobertshaw
Copy link
Contributor

Description

It is possible to generate invalid border-radius styles for blocks adopting the border-radius block support. The invalid styles consist of only a CSS unit e.g. border-radius: rem;

Screen Shot 2022-07-12 at 7 01 06 pm

The BorderRadiusControl was originally built following the BoxControl which suffered the same issue. The related PR fixing this for the BoxControl can be found in: #33444

Step-by-step reproduction instructions

  1. Edit a post in the block editor
  2. Add a group block and select it
  3. Within the sidebar, change the border-radius unit without supplying any value
  4. Switch to the code editor view and you'll find that the block's style object contains a css-unit-only value for radius
  5. Switch back to the visual editor and add some further content inside the group block
  6. Save the post and view it on the front end
  7. Inspect the group block element and notice the invalid styles

Screenshots, screen recording, code snippet

Screen.Recording.2022-07-12.at.7.08.40.pm.mp4

Environment info

WP: Latest
Gutenberg: trunk

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

@aaronrobertshaw aaronrobertshaw added [Type] Bug An existing feature does not function as intended [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Jul 12, 2022
@aaronrobertshaw aaronrobertshaw self-assigned this Jul 12, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 14, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants