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

Search Block: Custom-width search blocks are not fully right-aligned #31517

Open
kjellr opened this issue May 5, 2021 · 3 comments · May be fixed by #31919
Open

Search Block: Custom-width search blocks are not fully right-aligned #31517

kjellr opened this issue May 5, 2021 · 3 comments · May be fixed by #31919
Assignees
Labels
[Block] Search Affects the Search Block - used to display a search field [Type] Bug An existing feature does not function as intended

Comments

@kjellr
Copy link
Contributor

kjellr commented May 5, 2021

It appears that they have some sort of extra margin or spacing to the right of them:

Screen Shot 2021-05-05 at 1 41 55 PM

(Screenshot taken with the emptytheme to eliminate any theme styles. I think there may be something weird going on with that center-aligned search field label as well).

This space is not present when the button is 100% wide:

align

To reproduce

  1. Add a search block.
  2. Set it to be 25%, 50%, or 75% width.
  3. Set it to be right-aligned.
@kjellr kjellr added [Type] Bug An existing feature does not function as intended [Block] Search Affects the Search Block - used to display a search field labels May 5, 2021
@kjellr kjellr changed the title Search Block: Custom-width search blocks are not right-aligned Search Block: Custom-width search blocks are not fully right-aligned May 5, 2021
@ramonjd
Copy link
Member

ramonjd commented May 10, 2021

Hi there @kjellr ! Did you add anything specific to the theme.json or elsewhere to test this in empty theme?

The toolbar controls for left/center/right align aren't showing by default in a clean dev env. High probability it's just me :)

@kjellr
Copy link
Contributor Author

kjellr commented May 10, 2021

Running a fresh site with Gutenberg 10.5.4, and the latest emptytheme, the controls show up in the post/page editor, but not in the site editor. Running TT1 Blocks, it's the opposite 😅. I'm not sure if there's a bug in there somewhere?

For the issue here — I was running emptytheme and using the post/page editor.

@ramonjd
Copy link
Member

ramonjd commented May 10, 2021

Thanks for the quick reply!

@aaronrobertshaw set me straight by pointing me to this PR (Add a layout config to the group and theme.json and make alignments declarative), and the align.js hook, which filters valid alignment values.

So, for the empty theme, I just needed to enclose the search block in a group block for the alignment controls to appear. ✨

@glendaviesnz glendaviesnz self-assigned this May 13, 2021
@aaronrobertshaw aaronrobertshaw linked a pull request May 18, 2021 that will close this issue
7 tasks
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 [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants