Skip to content

Commit

Permalink
Hide the automatically displayed webkit-only clear/cancel search butt…
Browse files Browse the repository at this point in the history
…on. (#8538)
  • Loading branch information
isoos authored Feb 7, 2025
1 parent 1dee391 commit 6262f49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/web_css/lib/src/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
&:focus {
outline: none;
}

// This is a non-standard feature, supported only by webkit browsers
// https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-search-cancel-button
&::-webkit-search-cancel-button {
display: none;
}
}

>.icon {
Expand Down
1 change: 1 addition & 0 deletions pkg/web_css/test/expression_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void main() {
'keyframes',
'last-child',
'nth-child',
'-webkit-search-cancel-button',
]);
// composite patterns
expressions.removeWhere((e) => e.startsWith('home-block-'));
Expand Down

0 comments on commit 6262f49

Please sign in to comment.