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

No search 'cancel button' styles in Firefox due to them being a non-standard CSS feature #3678

Open
AshGDS opened this issue Oct 23, 2023 · 0 comments
Labels
acknowledged This issue has been triaged. design Design inconsistencies and quirks

Comments

@AshGDS
Copy link
Contributor

AshGDS commented Oct 23, 2023

What

  • Most browsers have a cancel button on any input type=search element, which allows the user to clear any text they have entered.
  • This can be styled via a CSS psuedo element called ::-webkit-search-cancel-button
  • I recently merged in a change requested by a designer to use our own cancel button styles. This was mainly because the default cancel button provided by browsers did not scale nicely when the page was zoomed in. See Use custom SVG for search 'cancel' icon #3673
  • Firefox does not support this psuedo element as it is a non standard feature https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-search-cancel-button - so Firefox has no cancel buttons at all, regardless of our custom styles.
  • When I asked on Slack wether we should go ahead with this change I was instructed by our Lead FE to raise this issue so that we can monitor this inconsistency, in case a search cancel button is added to Firefox in the future or the implementation in other browsers changes. https://gds.slack.com/archives/CAD0JFQ12/p1697712777367839

Example on Chrome (cancel button available)

image

Example on Firefox (cancel button unavailable)

image

@AshGDS AshGDS added the design Design inconsistencies and quirks label Oct 23, 2023
@jon-kirwan jon-kirwan added the acknowledged This issue has been triaged. label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged This issue has been triaged. design Design inconsistencies and quirks
Projects
None yet
Development

No branches or pull requests

2 participants