Skip to content

Commit

Permalink
Fixed Safari’s rendering of search inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos committed Jun 5, 2018
1 parent 30f58c3 commit 8213645
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Fixed `EuiComboBox` hidden input focus styles ([#894](https://github.com/elastic/eui/pull/894))
- Fixed responsive widths of `EuiDescribedFormGroup` ([#894](https://github.com/elastic/eui/pull/894))
- Fixed descenders being cut off in `EuiSelect` ([#894](https://github.com/elastic/eui/pull/894))
- Fixed extra spacing applied by Safari to `EuiFieldSearch` ([#894](https://github.com/elastic/eui/pull/894))

## [`0.0.51`](https://github.com/elastic/eui/tree/v0.0.51)

Expand Down
15 changes: 11 additions & 4 deletions src/components/form/field_search/_field_search.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
/*
* 1. Fix for Safari to ensure that it renders like a normal text input
* and doesn't add extra spacing around text
*/

.euiFieldSearch {
@include euiFormControlStyle;
@include euiFormControlWithIcon($isIconOptional: false);
@include euiFormControlIsLoading;
// This is a hack, since in Safari the search boxes were ignoring
// padding. Get Dave Snider involved. It improves rendering significantly
// although the padding still looks a bit off.
-webkit-appearance: textfield;

-webkit-appearance: textfield; /* 1 */

&::-webkit-search-decoration {
-webkit-appearance: none; /* 1 */
}
}

0 comments on commit 8213645

Please sign in to comment.