Skip to content

Instantly share code, notes, and snippets.

@meritt
Created October 29, 2015 17:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meritt/23c74c633fcfa66457e0 to your computer and use it in GitHub Desktop.
Save meritt/23c74c633fcfa66457e0 to your computer and use it in GitHub Desktop.
/**
* 1. Переопределяет свойство `appearance`, заменяет `searchfield` в Safari и Chrome.
* 2. Переопределяет свойство `box-sizing`, заменяет `border-box` в Safari и Chrome.
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
box-sizing: content-box; /* 2 */
}
/**
* Убирает внутренний отступ и кнопку очистки строки поиска в Safari и Chrome в OS X
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment