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

Extra spaces in search block / button markup #41608

Closed
bgardner opened this issue Jun 8, 2022 · 4 comments · Fixed by #41746
Closed

Extra spaces in search block / button markup #41608

bgardner opened this issue Jun 8, 2022 · 4 comments · Fixed by #41746
Assignees
Labels
[Block] Search Affects the Search Block - used to display a search field

Comments

@bgardner
Copy link

bgardner commented Jun 8, 2022

Description

Presumably with the addition of #40260, an extra space is added before the wp-element-button class on buttons found in the search block:

Step-by-step reproduction instructions

  1. Go to front end of website
  2. Inspect search form button
  3. See below

Screenshots, screen recording, code snippet

image

Environment info

WordPress 6.0, Gutenberg 13.4

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

@bgardner
Copy link
Author

bgardner commented Jun 8, 2022

Noting that in the screenshot above, there are other instances of spaces after class names as well.

@bgardner bgardner changed the title Extra space added to wp-element-button markup in search block Extra spaces in search block / button markup Jun 8, 2022
@skorasaurus skorasaurus added the [Block] Search Affects the Search Block - used to display a search field label Jun 9, 2022
@skorasaurus
Copy link
Member

I think the cause of the extra space is from

$button_classes .= ' ' . WP_Theme_JSON_GUTENBERG::__EXPERIMENTAL_ELEMENT_BUTTON_CLASS_NAME;
made by @scruffian ; maybe he has an idea whether it was intentionally included or if it's an accident.

@scruffian
Copy link
Contributor

This was an accident. Feel free to raise a PR to remove it!

@scruffian
Copy link
Contributor

There's a fix here: #41746

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 15, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Search Affects the Search Block - used to display a search field
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants