The problem I am having is that when I add the ionic 2 gesture (press) on a button it keeps automatically adding inline styles to that button.
Is there a way to overrule the style it adds?
Button
<button ion-button (press)="toggleFavourite(sound)" (click)="share(sound.file)"></button>
CSS it adds because of the (press) gesture.
style="
touch-action: none;
user-select: none;
-webkit-user-drag: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"
You can just do it as shown below on your page.scss file.
Note: Don't use !import hack.Which is very BAD.
page.scss
.ios,
.md,
.wp {
page-my {
.my-gesture {
touch-action: none;
user-select: none;
-webkit-user-drag: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
}
page.html
<button ion-button class="my-gesture" (press)="toggleFavourite(sound)"
(click)="share(sound.file)"></button>