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

101
Vistas
vue.js mode for css

I have this BaseComponent used and configures in another component as followed:

<BaseTitle
      v-slot="{ highlightClass }"
      :color="mode === 'faq' ? 'dark' : 'secondary'"
      v-bind="__titleProps"
      :text-uppercase="mode === 'incentive'"
      highlight-type="colorize-uppercase-bold"
      :class="{ 'font-weight-normal': mode === 'faq' }"
    >

On this element I have a css-hover class


    .InfoTile {
      &:hover {
        .answer {
          background-color: $transparent-primary;
          opacity: 1;
        }
    
        .question {
          opacity: 0;
        }
      }

When I use the „incentive" mode I need to use another hover background-color. Is there a way to use another hover depending on the mode I use?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

So, is totally possible.

You just need to create 2 differentes css classes, between normal mode and incentive, that will have 2 differentes hover, etc.

you'll made a conditional term checking if mode === incentive.

But, the first thing you need to do is to set more than one classes in your component, you're using one already.

so, just do something like this.

:class="[{ 'font-weight-normal': mode === 'faq' }, mode === incentive ? 'cssClass1': 'cssClass2']"
about 4 years ago · Juan Pablo Isaza 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