Skip to content

Commit

Permalink
fix(inputs): fix styles in firefox (#17066)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jan 11, 2019
1 parent 6364e4e commit 0120eee
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 26 deletions.
4 changes: 4 additions & 0 deletions core/src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@
appearance: none;
}

.button-native::-moz-focus-inner {
border: 0;
}

.button-native[disabled] {
cursor: default;
opacity: .5;
Expand Down
4 changes: 4 additions & 0 deletions core/src/components/item/item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
box-sizing: border-box;
}

.item-native::-moz-focus-inner {
border: 0;
}

button, a {
cursor: pointer;
user-select: none;
Expand Down
13 changes: 2 additions & 11 deletions core/src/components/searchbar/searchbar.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand All @@ -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;
}

Expand Down
13 changes: 3 additions & 10 deletions core/src/components/searchbar/searchbar.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}


Expand Down
23 changes: 23 additions & 0 deletions core/src/components/searchbar/searchbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
11 changes: 6 additions & 5 deletions core/src/components/searchbar/searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -366,10 +365,12 @@ export class Searchbar implements ComponentInterface {
onTouchStart={this.onCancelSearchbar}
class="searchbar-cancel-button"
>
{ this.mode === 'md'
? <ion-icon mode={this.mode} icon={this.cancelButtonIcon} lazy={false}></ion-icon>
: this.cancelButtonText
}
<div>
{ this.mode === 'md'
? <ion-icon mode={this.mode} icon={this.cancelButtonIcon} lazy={false}></ion-icon>
: this.cancelButtonText
}
</div>
</button>
);

Expand Down
4 changes: 4 additions & 0 deletions core/src/themes/ionic.mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

appearance: none;
outline: none;

&::-moz-focus-inner {
border: 0;
}
}

@mixin text-inherit() {
Expand Down

0 comments on commit 0120eee

Please sign in to comment.