Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Search block is missing styles #11

Closed
kjellr opened this issue Oct 5, 2021 · 8 comments
Closed

Search block is missing styles #11

kjellr opened this issue Oct 5, 2021 · 8 comments
Labels
[Component] Theme.json [Status] Needs Decision [Type] Gutenberg An upstream bug or feature request in Gutenberg

Comments

@kjellr
Copy link
Collaborator

kjellr commented Oct 5, 2021

Current state:

Screen Shot 2021-10-05 at 1 19 12 PM

@MaggieCabrera
Copy link
Collaborator

I had the markup for testing this block around, I'm dropping it here for easier testing:

<!-- wp:search {"label":"Search","placeholder":"Placeholder text...","buttonText":"Search"} /-->

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Placeholder text...","buttonText":"Search"} /-->

<!-- wp:search {"label":"Search","placeholder":"Placeholder text...","buttonText":"Search","buttonPosition":"button-inside"} /-->

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Placeholder text...","buttonText":"Search","buttonPosition":"button-inside"} /-->

<!-- wp:search {"label":"Search","placeholder":"Placeholder text...","buttonText":"Search","buttonUseIcon":true} /-->

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Placeholder text...","buttonText":"Search","buttonUseIcon":true} /-->

<!-- wp:search {"label":"Search","placeholder":"Placeholder text...","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true} /-->

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Placeholder text...","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true} /-->

<!-- wp:search {"label":"Search","placeholder":"Placeholder text...","buttonText":"Search","buttonPosition":"no-button"} /-->

<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Placeholder text...","buttonText":"Search","buttonPosition":"no-button"} /-->

How it looks like on TT2:

Screenshot 2021-10-06 at 19 36 05

@carolinan
Copy link
Collaborator

carolinan commented Oct 25, 2021

Is the correct style for the search block the one in the Figma template for the 404 page?

It's been a year since I used Figma :) -is the input field and button supposed to be 70px tall?

@kjellr
Copy link
Collaborator Author

kjellr commented Oct 25, 2021

I think we should actually just work backwards from the button:

  • The search button by default should use the same text size and padding as the normal button block.
  • Then the search field should be as tall as that button, so they line up.

@carolinan
Copy link
Collaborator

I believe this will need custom CSS because it can't be changed with theme.json:
WordPress/gutenberg#34216

@kjellr
Copy link
Collaborator Author

kjellr commented Nov 12, 2021

I opened an issue upstream to track this: WordPress/gutenberg#36444

@kjellr kjellr added [Type] Gutenberg An upstream bug or feature request in Gutenberg [Status] Needs Decision labels Nov 12, 2021
@kjellr kjellr removed this from the Feature Freeze milestone Nov 12, 2021
@jffng
Copy link
Collaborator

jffng commented Nov 12, 2021

I think we should hard code the styles in CSS, and remove them as soon as global styles supports styling the block.

@kjellr
Copy link
Collaborator Author

kjellr commented Nov 12, 2021

Let's give that a try and see how complicated/verbose the code needs to be.

@kjellr
Copy link
Collaborator Author

kjellr commented Nov 15, 2021

Fixed by #235.

@kjellr kjellr closed this as completed Nov 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Component] Theme.json [Status] Needs Decision [Type] Gutenberg An upstream bug or feature request in Gutenberg
Projects
None yet
Development

No branches or pull requests

4 participants