Skip to content

Conversation

@adamghill
Copy link
Contributor

Currently, there are two spacing issues I see in Vivaldi/Chrome around the searchbar in the top nav. Not sure if this is viewport width thing or a browser thing, though.

Screenshot 2025-11-29 at 8 11 59 AM

This is what it looks like Firefox for me:

image
  1. Too much whitespace to the right of the magnifying glass button.

Removing the explicit width: 40px takes away some of the whitespace around the magnifying button and makes the spacing look a little better to my eyes. When I search the repo for other form-input classes, I didn't see anywhere else that uses a button element inside the form, so I don't think this would affect anything else.

This is what it looks like in Vivaldi with that change:

image

And this is in Firefox:

image
  1. The toggle is too close to the searchbar in Vivaldi. This does not seem to happen in Firefox. I have some ideas for that fix, but was thinking it might be better as a separate PR. Let me know if that makes sense or if it'd be better in this one.

Tagging @sarahboyce since she might know the most about the search bar because of #2262.

@adamghill adamghill changed the title Do not set the width explicitly on .input-form button Remove explicit width on .input-form button Nov 29, 2025
@sarahboyce
Copy link
Contributor

I agree this looks better for desktop screens but tablet and mobile now look a little close to me

Screenshot from 2025-11-29 18-36-37

I feel like the 40px width is fine as the height is also 40px, the main issue to me is that it is not positioned at the end of the input and the same with mobile. On mobile it is closer to the end than it is on desktop screens

Screenshot from 2025-11-29 18-59-52

@adamghill
Copy link
Contributor Author

the main issue to me is that it is not positioned at the end of the input and the same with mobile

Ah, hmm, ok let me try keeping the 40px width, but a different tweak.

@sarahboyce
Copy link
Contributor

I have created an alternative PR #2365 - @adamghill can you test and see what you think?

@adamghill
Copy link
Contributor Author

adamghill commented Dec 3, 2025

I have created an alternative PR #2365 - @adamghill can you test and see what you think?

I replied! I think moving to flexbox is probably the better approach. But, if we don't want to do that I just pushed a change to this branch if you want to check it out. @sarahboyce

@adamghill adamghill changed the title Remove explicit width on .input-form button Improve spacing on search form field Dec 3, 2025
@sarahboyce
Copy link
Contributor

Tested and this looks great! It's also a much smaller change so I like it 😁
I will close the other PR 👍

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

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

I think you can make a non-draft and I can request a review from the website WG 😁

@adamghill adamghill marked this pull request as ready for review December 6, 2025 00:18
@sarahboyce sarahboyce requested a review from a team December 6, 2025 02:51
@bmispelon
Copy link
Member

I've tested it locally and the spacing does look better.

Thanks everyone!

@bmispelon bmispelon merged commit adf83cf into django:main Dec 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants