Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

289
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda