From 436cdf92c725361c4930a9e148ea37c2da61d2d6 Mon Sep 17 00:00:00 2001 From: Volker E Date: Sat, 9 Apr 2016 19:18:49 -0700 Subject: [PATCH] Normalize `input[type="search"]` Limiting property `-webkit-appearance` to `input[type="search"]` only, as it's the element this rule is targeting for instead of unnecessarily applying it to all `.mw-ui-input` elements. Also adding rule to remove proprietary IE 10-11 clear button. Bringing it on par with OOjs UI. Change-Id: Id375fdb86bf7ef3cfbb2f7e198d59be4947e4edb --- .../src/mediawiki.ui/components/inputs.less | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/resources/src/mediawiki.ui/components/inputs.less b/resources/src/mediawiki.ui/components/inputs.less index d0633aef68..579bd5f9f0 100644 --- a/resources/src/mediawiki.ui/components/inputs.less +++ b/resources/src/mediawiki.ui/components/inputs.less @@ -27,8 +27,6 @@ // // Styleguide 1.1. .mw-ui-input { - // turn off default input styling for input[type="search"] fields - -webkit-appearance: none; .box-sizing( border-box ); display: block; width: 100%; @@ -74,6 +72,23 @@ border-color: @colorGray14; color: @colorGray12; } + + // Normalize styling for `` + &[type="search"] { + // Correct the odd appearance in Chrome and Safari 5 + -webkit-appearance: textfield; + + // Remove proprietary clear button in IE 10-11 + &::-ms-clear { + display: none; + } + + // Remove the inner padding and cancel buttons in Chrome on OS X and Safari on OS X + &::-webkit-search-cancel-button, + &::-webkit-search-decoration { + -webkit-appearance: none; + } + } } textarea.mw-ui-input { -- 2.20.1