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

Fix search label cut off text #2305

Closed
wants to merge 1 commit into from
Closed

Conversation

danacotoran
Copy link
Contributor

The global site header search label text has been updated from "Search" to "Search on GOV.UK".

This has lead to an issue where the label text is now appearing clipped on larger mobile adaptations as there simply is not enough space to accommodate it.

Problem

Screenshot 2020-10-22 at 10 05 56

This updates the CSS so that the search field is hidden on larger mobiles – same as it currently is for smaller mobiles. The search form can be shown/hidden using the search toggle button.

Solution

Screenshot 2020-10-22 at 10 10 19


Thanks @issyl0 for bringing this to our attention 👉🏼 👉🏼 👉🏼 #2301

https://trello.com/c/RbD3om74

The global site header search label text has been updated from "Search"
to "Search on GOV.UK".
This has lead to an issue where the label text is now appearing clipped
on larger mobile adaptations as there simply is not enough space to
accommodate it.
This updates the CSS so that the search field is hidden on larger
mobiles – same as it currently is for smaller mobiles. The search form
can be shown/hidden using the search toggle button.
@bevanloon bevanloon temporarily deployed to govuk-static-search-lab-ezjp5i October 22, 2020 09:12 Inactive
@injms injms linked an issue Oct 23, 2020 that may be closed by this pull request
@@ -104,15 +105,18 @@
.search-toggle {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about making the styles for .search-toggle mobile first so the display: none would kick in ($from: tablet) instead of being overwritten?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @injms that's a good point – @chris-gds has actually mentioned this too 👍.

My rationale here is that the aim of this piece of work is to fix the issue by replacing the old media query style with the govuk-media-query equivalent.

This other PR removes a whole bunch of CSS and refactors the code so that it is mobile first, so I simply didn't want to repeat that on here in the interest of minimising potential conflicts/repetition (but I suppose there will be some conflicts either way, so I don't know... let me know what you think)

@injms
Copy link
Contributor

injms commented Oct 23, 2020

In Firefox, I'm seeing a slight overlap of the focus state:

image

@danacotoran
Copy link
Contributor Author

Closing this PR as #2293 has been approved and also fixes the issue.

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.

"Search on GOV.UK" label text is cut off on mobile (portrait) view.
3 participants