Skip to content

Commit f7c98c4

Browse files
committed
Don't remove search input cancel button in Chrome/Safari
Fix #685
1 parent 9f4876b commit f7c98c4

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ Chrome and Safari on Windows you can't control `border` properly. It will apply
8484
`border-width` but will only show a border color (which cannot be controlled)
8585
for the outer 1px of that border. Applying `-webkit-appearance: textfield`
8686
addresses these issues without removing the benefits of search inputs (e.g.
87-
showing past searches). Safari (but not Chrome) will clip the cancel button on
88-
when it has padding (and `textfield` appearance).
87+
showing past searches).
8988

9089
## Contributing
9190

normalize.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,9 @@ textarea {
285285
}
286286

287287
/**
288-
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
288+
* Remove the inner padding in Chrome and Safari on macOS.
289289
*/
290290

291-
[type="search"]::-webkit-search-cancel-button,
292291
[type="search"]::-webkit-search-decoration {
293292
-webkit-appearance: none;
294293
}

test.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,6 @@ <h3 class="Test-it">should be styleable</h3>
433433
<div class="Test-run">
434434
<input type="search" style="border:1px solid #ADD8E6; padding:10px; width:200px;">
435435
</div>
436-
<h3 class="Test-it">should not have a cancel button in Safari or Chrome</h3>
437-
<div class="Test-run">
438-
<input type="search" value="search">
439-
</div>
440436
<h3 class="Test-it">should reference inherited color</h3>
441437
<div class="Test-run">
442438
<input type="text" placeholder="Text goes here" style="background-color: black; color: orange;">

0 commit comments

Comments
 (0)