Skip to content

Commit 617b7ac

Browse files
committed
fix(show-hide-when): add !important to display as this should always take precedence
fixes #6270
1 parent 1ca4f37 commit 617b7ac

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ionic/components/show-hide-when/show-hide-when.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
// Applied by the showWhen directive
77
.hidden-show-when {
8-
display: none;
8+
display: none !important;
99
}
1010

1111
// Applied by the hideWhen directive
1212
.hidden-hide-when {
13-
display: none;
13+
display: none !important;
1414
}

ionic/components/show-hide-when/test/basic/main.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11

2-
<ion-toolbar><ion-title>Show/Hide When</ion-title></ion-toolbar>
2+
<ion-toolbar>
3+
<ion-title>Show/Hide When</ion-title>
4+
<ion-buttons end>
5+
<button showWhen="ios">iOS</button>
6+
<button showWhen="windows">Windows</button>
7+
<button showWhen="android">Android</button>
8+
</ion-buttons>
9+
</ion-toolbar>
310

411

512
<ion-content padding>
13+
<button showWhen="ios">iOS</button>
14+
<button showWhen="windows">Windows</button>
15+
<button showWhen="android">Android</button>
616

717
<p showWhen="ios" style="background:blue; color:white">
818
showWhen="ios"

0 commit comments

Comments
 (0)