Skip to content

Form Block: Global styles affect all form elements #56784

@t-hamano

Description

@t-hamano

Description

In the form block, the form element is specified as __experimentalSelector, so the global style affects all form elements.

"__experimentalSelector": "form"

I think that this is not the intended behavior and that this selector should be removed.

Step-by-step reproduction 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, screen recording, code snippet

bd5a24e054d67f773f4d761421f1d4ab.mp4

Environment info

No response

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

Metadata

Metadata

Assignees

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Block] Form (experimental)Affects the form block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions