fix(inputs): fix styles in firefox (#17066)

This commit is contained in:
Manu MA
2019-01-11 20:28:56 +01:00
committed by GitHub
parent 6364e4e2a1
commit 0120eee8d4
7 changed files with 46 additions and 26 deletions

View File

@ -225,6 +225,10 @@
appearance: none;
}
.button-native::-moz-focus-inner {
border: 0;
}
.button-native[disabled] {
cursor: default;
opacity: .5;

View File

@ -152,6 +152,10 @@
box-sizing: border-box;
}
.item-native::-moz-focus-inner {
border: 0;
}
button, a {
cursor: pointer;
user-select: none;

View File

@ -86,20 +86,11 @@
.searchbar-cancel-button {
@include padding(0, 0, 0, 8px);
display: none;
flex-shrink: 0;
border: 0;
outline: none;
background-color: $searchbar-ios-cancel-button-background-color;
font-size: $searchbar-ios-cancel-button-font-size;
cursor: pointer;
appearance: none;
}
@ -118,8 +109,8 @@
// Searchbar Has Focus & Animated
// -----------------------------------------
:host(.searchbar-show-cancel.searchbar-has-focus) .searchbar-cancel-button,
:host(.searchbar-show-cancel.searchbar-animated) .searchbar-cancel-button {
:host(.searchbar-has-focus) .searchbar-cancel-button,
:host(.searchbar-animated) .searchbar-cancel-button {
display: block;
}

View File

@ -33,13 +33,6 @@
.searchbar-cancel-button {
@include position(0, null, null, 5px);
@include margin(0);
display: none;
height: 100%;
border: 0;
background-color: $searchbar-md-cancel-button-background-color;
@ -108,12 +101,12 @@
// Searchbar Focused
// -----------------------------------------
:host(.searchbar-has-focus.searchbar-show-cancel) .searchbar-search-icon {
:host(.searchbar-has-focus) .searchbar-search-icon {
display: none;
}
:host(.searchbar-has-focus.searchbar-show-cancel) .searchbar-cancel-button {
display: inline-flex;
:host(.searchbar-has-focus) .searchbar-cancel-button {
display: block;
}

View File

@ -100,7 +100,30 @@
}
.searchbar-cancel-button {
@include margin(0);
display: none;
height: 100%;
border: 0;
outline: none;
color: var(--cancel-button-color);
cursor: pointer;
appearance: none;
}
.searchbar-cancel-button > div {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.searchbar-clear-button {

View File

@ -347,7 +347,6 @@ export class Searchbar implements ComponentInterface {
'searchbar-animated': animated,
'searchbar-no-animate': animated && this.noAnimate,
'searchbar-has-value': (this.getValue() !== ''),
'searchbar-show-cancel': this.showCancelButton,
'searchbar-left-aligned': this.shouldAlignLeft,
'searchbar-has-focus': this.focused
}
@ -366,10 +365,12 @@ export class Searchbar implements ComponentInterface {
onTouchStart={this.onCancelSearchbar}
class="searchbar-cancel-button"
>
<div>
{ this.mode === 'md'
? <ion-icon mode={this.mode} icon={this.cancelButtonIcon} lazy={false}></ion-icon>
: this.cancelButtonText
}
</div>
</button>
);

View File

@ -13,6 +13,10 @@
appearance: none;
outline: none;
&::-moz-focus-inner {
border: 0;
}
}
@mixin text-inherit() {