Created
December 20, 2021 21:54
-
-
Save DominikPeters/bcf40d928cfe6311c3f2c7e28328d046 to your computer and use it in GitHub Desktop.
Styling the ⤫ cancel button of input[type=search] for dark mode in Chrome and Safari
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Makes the clear/cancel/delete button bright instead of dark when in dark mode */ | |
@media (prefers-color-scheme: dark) { | |
input[type="search"]::-webkit-search-cancel-button { | |
filter: invert(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Top: normal, bottom: with style.