Skip to content

Commit

Permalink
Remove default Webkit search cancel button
Browse files Browse the repository at this point in the history
Fixes newly introduced bug where it was visible in the new 404 page. We
now remove it everywhere across the site in a single place.
  • Loading branch information
rakyi committed Sep 30, 2024
1 parent 0c44eba commit f0ecaf4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
&:focus-visible {
border: $focus;
}

&::-webkit-search-cancel-button {
-webkit-appearance: none;
}
}

&.search-input--empty {
Expand Down
6 changes: 6 additions & 0 deletions site/owid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@
@import "css/donate.scss";
@import "./ThankYouPage.scss";

// Remove default Webkit search cancel button.
// https://stackoverflow.com/a/77190241/9846837
[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}

/* HACK (Mispy): Fix search autozooming on iPhone Safari.
http://stackoverflow.com/questions/2989263/disable-auto-zoom-in-input-text-tag-safari-on-iphone */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
Expand Down
4 changes: 0 additions & 4 deletions site/search/Search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ $reset-button-margin: 16px;
border: none;
outline: $blue-20 1px solid;
outline-offset: 0px;

&::-webkit-search-cancel-button {
-webkit-appearance: none;
}
}

.search-panel-reset-button {
Expand Down

0 comments on commit f0ecaf4

Please sign in to comment.