Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
Removing automaticly injected CSS styles in Angular 2/ Ionic 2

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);"
over 4 years ago · Santiago Trujillo
1 answers
Answer question

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>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!