Skip to content

Fix: Global styles affect all form elements ( Form Block ) #70392

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

Merged

Conversation

Rishit30G
Copy link
Contributor

What?

Closes #56784

Why?

The styles changes for the form element is affecting other block styles

How?

This PR removes the "__experimentalSelector": "form" from the form's block.json

Testing Instructions

  • Open any template in the Site Editor.
  • Insert a form block into your template.
  • Insert a block with form elements. Such as the Table block and the Embed block.
  • Open the Global Styles and select Blocks > form.
  • Change the style.
  • The styles of form elements other than the form block should also change.

Screenshots or screencast

Before

Screen.Recording.2025-06-12.at.10.00.09.AM.mov

After

Screen.Recording.2025-06-12.at.10.09.11.AM.mov

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Rishit30G <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Block] Form (experimental) Affects the form block labels Jun 12, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I believe there should be no reason for this block to need the __experimentalSelector.

@t-hamano
Copy link
Contributor

Unfortunately, it seems that recent changes in the core are causing E2E tests to fail. Let's wait until that issue is resolved.

@t-hamano
Copy link
Contributor

Unfortunately, it seems that recent changes in the core are causing E2E tests to fail. Let's wait until that issue is resolved.

This is a known issue and is not related to this PR, so let's merge this PR. See https://wordpress.slack.com/archives/C02QB2JS7/p1749712750681339

@t-hamano t-hamano merged commit 022282b into WordPress:trunk Jun 14, 2025
74 of 80 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.1 milestone Jun 14, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Form (experimental) Affects the form block Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form Block: Global styles affect all form elements
2 participants